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

66 lines
1.5 KiB
YAML
Raw Normal View History

version: "3.4"
2022-11-23 19:29:32 +01:00
# DO NOT USE THIS IN PRODUCTION - it is for development only due to insecure
# settings and the use of "runserver" versus "gunicorn".
# See https://takahe-server.readthedocs.io/en/latest/installation.html for more
x-takahe-common:
&takahe-common
build:
context: ..
dockerfile: ./docker/Dockerfile
image: takahe:latest
environment:
2022-11-27 18:54:01 +01:00
TAKAHE_DATABASE_SERVER: "postgres://postgres:insecure_password@db/takahe"
TAKAHE_DEBUG: "true"
TAKAHE_SECRET_KEY: "insecure_secret"
TAKAHE_CSRF_TRUSTED_ORIGINS: '["http://127.0.0.1:8000", "https://127.0.0.1:8000"]'
2022-11-27 18:54:01 +01:00
TAKAHE_USE_PROXY_HEADERS: "true"
TAKAHE_EMAIL_BACKEND: "console://console"
TAKAHE_MAIN_DOMAIN: "example.com"
TAKAHE_ENVIRONMENT: "development"
networks:
- external_network
- internal_network
restart: on-failure
depends_on:
- db
volumes:
- ..:/takahe/
2022-11-09 05:05:51 +01:00
services:
db:
2022-11-27 18:54:01 +01:00
image: docker.io/postgres:15-alpine
2022-11-09 05:05:51 +01:00
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 05:05:51 +01:00
web:
<<: *takahe-common
2022-11-09 05:05:51 +01:00
ports:
- "8000:8000"
2022-11-27 18:54:01 +01:00
stator:
<<: *takahe-common
command: ["/takahe/manage.py", "runstator"]
setup:
<<: *takahe-common
command: ["/takahe/manage.py", "migrate"]
2022-11-09 05:05:51 +01:00
networks:
internal_network:
external_network:
volumes:
dbdata: