# {{ ansible_managed }} version: '3.5' services: etherpad: image: {{ docker_etherpad_version }} restart: always environment: 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 }}" DEFAULT_PAD_TEXT: "{{ docker_etherpad_default_pad_text }}" volumes: - {{ docker_etherpad_data_dir }}/{{ docker_etherpad_service_id }}/node_modules:/opt/etherpad-lite/node_modules - {{ docker_etherpad_data_dir }}/{{ docker_etherpad_service_id }}/settings.json:/opt/etherpad-lite/settings.json 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 networks: - traefik - etherpad db: image: postgres:14 restart: always 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