fix docker setup
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
api:
|
||||
build:
|
||||
@@ -12,6 +10,11 @@ services:
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "9229:9229"
|
||||
volumes:
|
||||
- ./apps/api:/app/apps/api
|
||||
- ./core:/app/core
|
||||
- ./adapters:/app/adapters
|
||||
- ./tsconfig.base.json:/app/tsconfig.base.json:ro
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
@@ -29,6 +32,12 @@ services:
|
||||
- NEXT_TELEMETRY_DISABLED=1
|
||||
ports:
|
||||
- "3001:3000"
|
||||
volumes:
|
||||
- ./apps/website:/app/apps/website
|
||||
- ./core:/app/core
|
||||
- ./adapters:/app/adapters
|
||||
- ./scripts:/app/scripts
|
||||
- ./tsconfig.base.json:/app/tsconfig.base.json:ro
|
||||
networks:
|
||||
- gridpilot-network
|
||||
restart: unless-stopped
|
||||
@@ -36,10 +45,8 @@ services:
|
||||
db:
|
||||
image: postgres:15-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- POSTGRES_DB=${POSTGRES_DB:-gridpilot_db}
|
||||
- POSTGRES_USER=${POSTGRES_USER:-user}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
|
||||
env_file:
|
||||
- .env.development
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
@@ -47,7 +54,7 @@ services:
|
||||
networks:
|
||||
- gridpilot-network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-user} -d ${POSTGRES_DB:-gridpilot_db}"]
|
||||
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
Reference in New Issue
Block a user