+3
-27
@@ -1,42 +1,18 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: no-whatever-db
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_USER: nowhatever
|
||||
POSTGRES_PASSWORD: nowhatever
|
||||
POSTGRES_DB: nowhatever
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U nowhatever"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nginx
|
||||
|
||||
app:
|
||||
build: .
|
||||
image: no-whatever:latest
|
||||
container_name: no-whatever
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- /data/no-whatever:/app/data
|
||||
environment:
|
||||
- DATABASE_URL=postgresql://nowhatever:nowhatever@postgres:5432/nowhatever
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
- DATABASE_URL=file:/app/data/prod.db
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nginx
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
|
||||
networks:
|
||||
nginx:
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user