@@ -0,0 +1,41 @@
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
DATABASE_URL: postgresql://fpt:${POSTGRES_PASSWORD:-fpt_secret}@db:5432/fpt?schema=public
|
||||
NODE_ENV: development
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- .:/app
|
||||
- /app/node_modules
|
||||
- /app/.next
|
||||
networks:
|
||||
- internal
|
||||
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_DB: fpt
|
||||
POSTGRES_USER: fpt
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-fpt_secret}
|
||||
volumes:
|
||||
- fpt_pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U fpt -d fpt"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
networks:
|
||||
- internal
|
||||
|
||||
volumes:
|
||||
fpt_pgdata:
|
||||
|
||||
networks:
|
||||
internal:
|
||||
Reference in New Issue
Block a user