54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: ./docker/ploughshares
|
|
dockerfile: Dockerfile
|
|
image: ploughshares:dev
|
|
ports:
|
|
- "5005:5001"
|
|
environment:
|
|
- FLASK_RUN_PORT=5001
|
|
- FLASK_ENV=development
|
|
- FLASK_DEBUG=1
|
|
- POSTGRES_HOST=db
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_DB=ploughshares
|
|
- POSTGRES_USER=ploughshares
|
|
- POSTGRES_PASSWORD=ploughshares_password
|
|
- APP_ENV=development
|
|
- CSP_JS_HASH=default_js_hash
|
|
- CSP_CSS_HASH=default_css_hash
|
|
- CSP_CUSTOM_CSS_HASH=default_custom_css_hash
|
|
command: python app.py
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./docker/ploughshares:/app
|
|
- ./docker/ploughshares/uploads:/app/uploads
|
|
|
|
db:
|
|
image: postgres:12
|
|
environment:
|
|
- POSTGRES_DB=ploughshares
|
|
- POSTGRES_USER=ploughshares
|
|
- POSTGRES_PASSWORD=ploughshares_password
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_dev_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_dev_data:
|
|
|
|
networks:
|
|
default:
|
|
name: ploughshares-dev |