This commit is contained in:
49
docker-compose.prod.yml
Normal file
49
docker-compose.prod.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:17-alpine
|
||||
container_name: wedding_db
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-wedding}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-wedding}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- app_network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-wedding}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
image: 192.168.31.100:3847/arrelin/wedding-backend:latest
|
||||
container_name: wedding_backend
|
||||
environment:
|
||||
DATABASE_URL: postgres://${POSTGRES_USER:-wedding}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB:-wedding}
|
||||
PORT: 8080
|
||||
RUST_LOG: ${RUST_LOG:-info}
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- app_network
|
||||
restart: unless-stopped
|
||||
|
||||
frontend:
|
||||
image: 192.168.31.100:3847/arrelin/wedding-frontend:latest
|
||||
container_name: wedding_frontend
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
- app_network
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
app_network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
driver: local
|
||||
Reference in New Issue
Block a user