This repository has been archived on 2023-09-24. You can view files and clone it, but cannot push or open issues or pull requests.
takahe/docker/docker-compose.yml
2022-11-23 00:01:18 -07:00

52 lines
968 B
YAML

version: "3.4"
x-takahe-common:
&takahe-common
build: .
image: takahe:latest
environment:
DJANGO_SETTINGS_MODULE: takahe.settings.development
PGHOST: db
PGDATABASE: takahe
PGUSER: postgres
PGPASSWORD: insecure_password
networks:
- external_network
- internal_network
restart: on-failure
depends_on:
- db
volumes:
- ..:/takahe/
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
web:
<<: *takahe-common
ports:
- "8000:8000"
setup:
<<: *takahe-common
command: ["/takahe/manage.py", "migrate"]
networks:
internal_network:
external_network:
volumes:
dbdata: