38 lines
709 B
YAML
38 lines
709 B
YAML
services:
|
|
db:
|
|
image: postgres:15-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${DB_NAME}
|
|
POSTGRES_USER: ${DB_USER}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
ports:
|
|
- "5432:5432"
|
|
networks:
|
|
network:
|
|
volumes:
|
|
- db_data:/var/lib/postgresql/data
|
|
|
|
api:
|
|
build: .
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8095:8080"
|
|
networks:
|
|
network:
|
|
environment:
|
|
DB_NAME: ${DB_NAME}
|
|
DB_HOST: ${DB_HOST}
|
|
DB_PORT: ${DB_PORT}
|
|
DB_USER: ${DB_USER}
|
|
DB_PASSWORD: ${DB_PASSWORD}
|
|
APP_ALLOWED_ORIGINS: ${APP_ALLOWED_ORIGINS}
|
|
depends_on:
|
|
- db
|
|
|
|
volumes:
|
|
db_data:
|
|
|
|
networks:
|
|
network:
|
|
driver: bridge |