fix: coolify not finding root project

This commit is contained in:
Rotimi Best
2024-09-19 11:01:56 +01:00
parent e097474b06
commit 5438d9acf1
4 changed files with 32 additions and 13 deletions
+1 -1
View File
@@ -15,4 +15,4 @@ build
package
**/.env
.pnpm-store
.pnpm-store/*
+20
View File
@@ -0,0 +1,20 @@
FROM node:18
WORKDIR "/app"
RUN npm install -g pnpm
COPY ./package.json ./
COPY ./pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . /app/
CMD [ "ls", "-la" ]
CMD [ "cd", "apps/dashboard" ]
CMD [ "pnpm", "build" ]
EXPOSE 5000
CMD [ "pnpm", "start" ]
+10 -10
View File
@@ -8,11 +8,12 @@ version: '3.8'
services:
backend:
image: node:18
working_dir: /app/project
command: sh -c "cd apps/backend && rm -rf node_modules && npm i && npm start"
ports:
- '3002:3002'
build:
dockerfile: Dockerfile
context: ./apps/backend
volumes:
- /app/node_modules
- ./apps/backend:/app
environment:
- NODE_ENV=production
# Supabase - Database
@@ -31,11 +32,10 @@ services:
- SMTP_PORT=${SMTP_PORT}
dashboard:
image: node:18
working_dir: /app/project
command: sh -c "npm install -g pnpm && rm -rf node_modules && yes | pnpm install --frozen-lockfile && cd apps/dashboard && pnpm build && pnpm start"
ports:
- '5173:5173'
build:
dockerfile: ./apps/dashboard/Dockerfile
context: .
# command: sh -c "npm install -g pnpm && rm -rf node_modules && yes | pnpm install --frozen-lockfile && cd apps/dashboard && pnpm build && pnpm start"
environment:
- NODE_ENV=production
- IS_SELFHOSTED=true
+1 -2
View File
@@ -3,8 +3,7 @@
"version": "0.1.1",
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev",
"prepare": "turbo run prepare",
"dev": "turbo prepare && turbo run dev",
"lint": "turbo run lint",
"clean": "turbo clean && rm -rf node_modules",
"format": "prettier . --write",