ansible-role-docker_etherpad/templates/docker-compose.yml

56 lines
1.9 KiB
YAML
Raw Normal View History

2022-08-28 20:53:55 +02:00
# {{ ansible_managed }}
services:
etherpad:
image: {{ docker_etherpad_version }}
2022-08-28 20:53:55 +02:00
restart: always
environment:
2024-11-12 20:57:30 +01:00
NODE_ENV: production
2022-08-28 20:53:55 +02:00
DB_TYPE: postgres
DB_HOST: db
DB_PORT: 5432
DB_NAME: "{{ docker_etherpad_db_name }}"
DB_USER: "{{ docker_etherpad_db_user }}"
DB_PASS: "{{ docker_etherpad_db_password }}"
ADMIN_PASSWORD: "{{ docker_etherpad_admin_password }}"
SOCKETIO_MAX_HTTP_BUFFER_SIZE: "{{ docker_etherpad_socketio_max_http_buffer_size }}"
2024-11-11 00:09:03 +01:00
TRUST_PROXY: true
2022-08-28 20:53:55 +02:00
DEFAULT_PAD_TEXT: "{{ docker_etherpad_default_pad_text }}"
volumes:
2024-11-12 20:57:30 +01:00
- {{ docker_etherpad_data_dir }}/{{ docker_etherpad_service_id }}/plugin_packages:/opt/etherpad-lite/src/plugin_packages
- {{ docker_etherpad_data_dir }}/{{ docker_etherpad_service_id }}/var:/opt/etherpad-lite/var
- {{ docker_etherpad_data_dir }}/{{ docker_etherpad_service_id }}/settings.json:/opt/etherpad-lite/settings.json
2022-08-28 20:53:55 +02:00
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.routers.{{ docker_etherpad_service_id }}.entrypoints=web"
- "traefik.http.routers.{{ docker_etherpad_service_id }}.rule=Host(`{{ docker_etherpad_fqdn }}`)"
- "traefik.http.services.{{ docker_etherpad_service_id }}.loadbalancer.server.port=9001"
depends_on:
db:
condition: service_healthy
2022-08-28 20:53:55 +02:00
networks:
- traefik
- etherpad
db:
image: postgres:14
restart: always
2022-08-28 20:53:55 +02:00
shm_size: 256mb
networks:
- etherpad
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes:
- {{ docker_etherpad_data_dir }}/{{ docker_etherpad_service_id }}/db_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: "{{ docker_etherpad_db_name }}"
POSTGRES_USER: "{{ docker_etherpad_db_user }}"
POSTGRES_PASSWORD: "{{ docker_etherpad_db_password }}"
networks:
traefik:
external: true
etherpad:
internal: true