Deploy to production
This commit is contained in:
+21
-11
@@ -3,16 +3,26 @@ services:
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
target: development
|
||||
target: production
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
# Map the host source code to the container for hot-reloading
|
||||
- .:/app
|
||||
# Prevents the container's node_modules from being overwritten by the host
|
||||
- /app/node_modules
|
||||
- "3001:80"
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
# Optional: ensure container runs smoothly on Windows host
|
||||
stdin_open: true
|
||||
tty: true
|
||||
- NODE_ENV=production
|
||||
labels:
|
||||
- "coolify.endpoint=true"
|
||||
|
||||
api:
|
||||
restart: always
|
||||
build:
|
||||
context: ./backend
|
||||
ports:
|
||||
- "3005:3005"
|
||||
volumes:
|
||||
- data-volume:/app/data
|
||||
- uploads-volume:/app/uploads
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
|
||||
volumes:
|
||||
data-volume:
|
||||
uploads-volume:
|
||||
|
||||
Reference in New Issue
Block a user