# {{ ansible_managed }} services: etherpad: image: {{ docker_etherpad_version }} restart: always environment: NODE_ENV: production 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 }}" TRUST_PROXY: true DEFAULT_PAD_TEXT: "{{ docker_etherpad_default_pad_text }}" volumes: - {{ 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 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