39 lines
757 B
YAML
39 lines
757 B
YAML
version: '3.8'
|
|
|
|
networks:
|
|
app_network:
|
|
driver: bridge
|
|
|
|
services:
|
|
${REPO_NAME}:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
- DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/${REPO_NAME_SNAKE}?sslmode=disable"
|
|
depends_on:
|
|
- postgres
|
|
restart: unless-stopped
|
|
networks:
|
|
- app_network
|
|
|
|
postgres:
|
|
image: postgres:18
|
|
container_name: postgres18
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: ${REPO_NAME_SNAKE}
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
networks:
|
|
- app_network
|
|
|
|
volumes:
|
|
postgres_data:
|