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 package
**/.env **/.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: services:
backend: backend:
image: node:18 build:
working_dir: /app/project dockerfile: Dockerfile
command: sh -c "cd apps/backend && rm -rf node_modules && npm i && npm start" context: ./apps/backend
ports: volumes:
- '3002:3002' - /app/node_modules
- ./apps/backend:/app
environment: environment:
- NODE_ENV=production - NODE_ENV=production
# Supabase - Database # Supabase - Database
@@ -31,11 +32,10 @@ services:
- SMTP_PORT=${SMTP_PORT} - SMTP_PORT=${SMTP_PORT}
dashboard: dashboard:
image: node:18 build:
working_dir: /app/project dockerfile: ./apps/dashboard/Dockerfile
command: sh -c "npm install -g pnpm && rm -rf node_modules && yes | pnpm install --frozen-lockfile && cd apps/dashboard && pnpm build && pnpm start" context: .
ports: # command: sh -c "npm install -g pnpm && rm -rf node_modules && yes | pnpm install --frozen-lockfile && cd apps/dashboard && pnpm build && pnpm start"
- '5173:5173'
environment: environment:
- NODE_ENV=production - NODE_ENV=production
- IS_SELFHOSTED=true - IS_SELFHOSTED=true
+1 -2
View File
@@ -3,8 +3,7 @@
"version": "0.1.1", "version": "0.1.1",
"scripts": { "scripts": {
"build": "turbo run build", "build": "turbo run build",
"dev": "turbo run dev", "dev": "turbo prepare && turbo run dev",
"prepare": "turbo run prepare",
"lint": "turbo run lint", "lint": "turbo run lint",
"clean": "turbo clean && rm -rf node_modules", "clean": "turbo clean && rm -rf node_modules",
"format": "prettier . --write", "format": "prettier . --write",