takahe/docker/docker-compose.yml

57 lines
1.1 KiB
YAML
Raw Normal View History

version: "3.4"
x-takahe-common:
&takahe-common
build: .
image: takahe:latest
environment:
DJANGO_SETTINGS_MODULE: takahe.settings.production
PGHOST: db
PGDATABASE: takahe
PGUSER: postgres
PGPASSWORD: insecure_password
TAKAHE_SECRET_KEY: insecure_secret
TAKAHE_MAIN_DOMAIN: example.com
TAKAHE_EMAIL_CONSOLE_ONLY: "true"
TAKAHE_MEDIA_BACKEND: local
TAKAHE_AUTO_ADMIN_EMAIL: admin@example.com
networks:
- external_network
- internal_network
restart: on-failure
depends_on:
- db
volumes:
- ..:/takahe/
2022-11-09 04:05:51 +00:00
services:
db:
image: postgres:15-alpine
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes:
- dbdata:/var/lib/postgresql/data
networks:
- internal_network
restart: always
environment:
POSTGRES_DB: takahe
POSTGRES_USER: postgres
POSTGRES_PASSWORD: insecure_password
2022-11-09 04:05:51 +00:00
web:
<<: *takahe-common
2022-11-09 04:05:51 +00:00
ports:
- "8000:8000"
setup:
<<: *takahe-common
command: ["/takahe/manage.py", "migrate"]
2022-11-09 04:05:51 +00:00
networks:
internal_network:
external_network:
volumes:
dbdata: