forked from data.coop/ansible
56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
|
---
|
||
|
|
||
|
- name: run membersystem containers
|
||
|
docker_compose:
|
||
|
project_name: "member.data.coop"
|
||
|
pull: yes
|
||
|
definition:
|
||
|
version: "3"
|
||
|
services:
|
||
|
backend:
|
||
|
image: docker.data.coop/member.data.coop:main
|
||
|
restart: unless-stopped
|
||
|
user: $UID:$GID
|
||
|
tty: true
|
||
|
ports:
|
||
|
- "8000:8000"
|
||
|
depends_on:
|
||
|
- postgres
|
||
|
networks:
|
||
|
- membersystem
|
||
|
- external_services
|
||
|
- postfix
|
||
|
environment:
|
||
|
SECRET_KEY: "{{ membersystem_secrets.secret_key }}"
|
||
|
DATABASE_URL: postgres://postgres:{{ postgres_passwords.membersystem }}@postgres:5432/postgres
|
||
|
POSTGRES_HOST: postgres
|
||
|
POSTGRES_PORT: 5432
|
||
|
EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend"
|
||
|
EMAIL_URL: "smtp://noop@{{ smtp_host }}:{{ smtp_port }}"
|
||
|
VIRTUAL_HOST: "member.data.coop"
|
||
|
LETSENCRYPT_HOST: "member.data.coop"
|
||
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
||
|
ALLOWED_HOSTS: "member.data.coop"
|
||
|
DJANGO_ADMINS: "Vidir:valberg@orn.li"
|
||
|
DEFAULT_FROM_EMAIL: "support@data.coop"
|
||
|
labels:
|
||
|
com.centurylinklabs.watchtower.enable: "true"
|
||
|
|
||
|
postgres:
|
||
|
image: postgres:13-alpine
|
||
|
volumes:
|
||
|
- "{{ volume_root_folder }}/membersystem/postgres/data:/var/lib/postgresql/data"
|
||
|
ports:
|
||
|
- 5432:5432
|
||
|
networks:
|
||
|
- membersystem
|
||
|
environment:
|
||
|
POSTGRES_PASSWORD: "{{ postgres_passwords.membersystem }}"
|
||
|
|
||
|
networks:
|
||
|
membersystem:
|
||
|
external_services:
|
||
|
external: true
|
||
|
postfix:
|
||
|
external: true
|