DB ready
This commit is contained in:
@@ -12,18 +12,21 @@
|
||||
API_PORT: 4005
|
||||
API_BASE_URL: http://localhost:4005
|
||||
NEXT_PUBLIC_API_BASE_URL: http://localhost:4005
|
||||
DATABASE_URL: postgres://postgres:postgres@localhost:5433/claudia_blog
|
||||
CORS_ORIGINS: http://localhost:3005
|
||||
DATABASE_URL: postgres://postgres:postgres@postgres:5432/claudia_blog
|
||||
CORS_ORIGINS: http://localhost:3005,http://172.25.182.67:3005
|
||||
WATCHPACK_POLLING: "true"
|
||||
volumes:
|
||||
- .:/app
|
||||
- node_modules:/app/node_modules
|
||||
- uploads:/app/public/uploads
|
||||
depends_on:
|
||||
- postgres
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
working_dir: /app
|
||||
tty: true
|
||||
stdin_open: true
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
postgres:
|
||||
image: postgres:latest
|
||||
@@ -31,14 +34,25 @@
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: claudia_blog
|
||||
PGDATA: /tmp/pgdata
|
||||
command:
|
||||
- "postgres"
|
||||
- "-c"
|
||||
- "listen_addresses=*"
|
||||
ports:
|
||||
- "5433:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- "0.0.0.0:5433:5432"
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
networks:
|
||||
app-network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
node_modules:
|
||||
postgres_data:
|
||||
uploads:
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user