ploughshares/docker-compose.yml

48 lines
1.1 KiB
YAML

version: '3.8'
services:
app:
build:
context: ./docker/ploughshares
platforms:
- linux/amd64
- linux/arm64
image: ploughshares:latest
ports:
- "5001:5001"
environment:
- FLASK_RUN_PORT=5001
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=ploughshares
- POSTGRES_USER=ploughshares
- POSTGRES_PASSWORD=ploughshares_password
- APP_VERSION=0.4.0
- APP_ENV=development
depends_on:
db:
condition: service_healthy
volumes:
- ./docker/ploughshares/uploads:/app/uploads
db:
image: postgres:12
environment:
- POSTGRES_DB=ploughshares
- POSTGRES_USER=ploughshares
- POSTGRES_PASSWORD=ploughshares_password
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/ploughshares/schema.sql:/docker-entrypoint-initdb.d/schema.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ploughshares"]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres_data:
networks:
ploughshares-network:
driver: bridge