36 lines
797 B
YAML
36 lines
797 B
YAML
services:
|
|
postgres:
|
|
image: postgres:16
|
|
container_name: svg-service-postgres
|
|
env_file:
|
|
- ./.env
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
ports:
|
|
- "5434:5432"
|
|
volumes:
|
|
- ./postgres-data:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 20
|
|
|
|
svg-service:
|
|
build:
|
|
context: ./backend
|
|
container_name: svg-service
|
|
env_file:
|
|
- ./.env
|
|
ports:
|
|
- "9020:9020"
|
|
volumes:
|
|
- ./storage:/data
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|