86 lines
2.4 KiB
YAML
86 lines
2.4 KiB
YAML
|
---
|
||
|
|
||
|
- name: ensure byro data folder exists
|
||
|
file:
|
||
|
path: "{{ services.byro.volume_folder }}"
|
||
|
state: directory
|
||
|
|
||
|
- name: create env file
|
||
|
template:
|
||
|
src: byro.env.j2
|
||
|
dest: "{{ services.byro.volume_folder }}/env"
|
||
|
|
||
|
- name: deploy entrypoint file
|
||
|
copy:
|
||
|
src: byro_deploy_entrypoint.sh
|
||
|
dest: "{{ services.byro.volume_folder}}/data/deploy_entrypoint.sh"
|
||
|
mode: "preserve"
|
||
|
|
||
|
- name: run byro
|
||
|
docker_compose:
|
||
|
project_name: "byro member system"
|
||
|
pull: yes
|
||
|
definition:
|
||
|
version: "3.8"
|
||
|
services:
|
||
|
|
||
|
manage:
|
||
|
image: ghcr.io/valberg/byro:add_missing_jquery_ui_images
|
||
|
entrypoint: "/var/byro/data/deploy_entrypoint.sh"
|
||
|
restart: "no"
|
||
|
volumes:
|
||
|
- "{{ services.byro.volume_folder }}/data:/var/byro/data"
|
||
|
- "{{ services.byro.volume_folder }}/static.dist:/byro/static.dist:rw"
|
||
|
networks:
|
||
|
- byro
|
||
|
- external_services
|
||
|
- postfix
|
||
|
env_file: "{{ services.byro.volume_folder }}/env"
|
||
|
|
||
|
gunicorn:
|
||
|
image: ghcr.io/byro/byro:master
|
||
|
restart: unless-stopped
|
||
|
working_dir: '/byro'
|
||
|
entrypoint:
|
||
|
- 'gunicorn'
|
||
|
command: >
|
||
|
byro.wsgi --name byro --workers 4
|
||
|
--max-requests 1200 --max-requests-jitter 50
|
||
|
--log-level=info
|
||
|
--bind=0.0.0.0:8345
|
||
|
links:
|
||
|
- postgres
|
||
|
depends_on:
|
||
|
postgres:
|
||
|
condition: service_healthy
|
||
|
volumes:
|
||
|
- "{{ services.byro.volume_folder }}/data:/var/byro/data"
|
||
|
- "{{ services.byro.volume_folder }}/static.dist:/byro/static.dist:rw"
|
||
|
networks:
|
||
|
- byro
|
||
|
- external_services
|
||
|
- postfix
|
||
|
env_file: "{{ services.byro.volume_folder }}/env"
|
||
|
|
||
|
postgres:
|
||
|
image: postgres:{{ services.byro.postgres_version }}
|
||
|
volumes:
|
||
|
- "{{ services.byro.volume_folder }}/postgres/:/var/lib/postgresql/data"
|
||
|
restart: unless-stopped
|
||
|
healthcheck:
|
||
|
test: ["CMD-SHELL", "pg_isready -U byro"]
|
||
|
interval: 5s
|
||
|
timeout: 5s
|
||
|
retries: 5
|
||
|
environment:
|
||
|
POSTGRES_PASSWORD: "{{ postgres_passwords.byro }}"
|
||
|
networks:
|
||
|
- byro
|
||
|
|
||
|
networks:
|
||
|
byro:
|
||
|
external_services:
|
||
|
external: true
|
||
|
postfix:
|
||
|
external: true
|