--- version: "3.8" services: app: image: ${APP_DOCKER_IMAGE} depends_on: - db - search environment: - POSTGRES_HOST=${STACK_NAME}_db - SEARCH_MEILI_INSTANCE=http://${STACK_NAME}_search:7700 - POSTGRES_USER=postgres - POSTGRES_DB=bonfire_db - PUBLIC_PORT=443 - MIX_ENV=prod - HOSTNAME - MAIL_BACKEND - INVITE_ONLY - INSTANCE_DESCRIPTION - DISABLE_DB_AUTOMIGRATION - UPLOAD_LIMIT - INVITE_KEY - MAIL_DOMAIN - MAIL_KEY - MAIL_FROM - SENTRY_DSN - WEB_PUSH_SUBJECT - WEB_PUSH_PUBLIC_KEY - WEB_PUSH_PRIVATE_KEY - GEOLOCATE_OPENCAGEDATA - GITHUB_TOKEN - APP_NAME - LANG - SEEDS_USER - ERLANG_COOKIE - REPLACE_OS_VARS - LIVEVIEW_ENABLED secrets: - postgres_password - secret_key_base - signing_salt - encryption_salt - meili_master_key - seeds_pw - livebook_password volumes: - upload-data:/opt/app/data/uploads networks: - proxy - internal entrypoint: ["/docker-entrypoint.sh", "./bin/bonfire", "start"] configs: - source: app_entrypoint target: /docker-entrypoint.sh mode: 0555 deploy: restart_policy: condition: on-failure labels: - "traefik.enable=true" - "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=4000" - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})" - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" ## Redirect from EXTRA_DOMAINS to DOMAIN #- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect" #- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true" #- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}" # healthcheck: # test: ["CMD", "curl", "-f", "http://localhost"] # interval: 30s # timeout: 10s # retries: 10 # start_period: 1m db: image: ${DB_DOCKER_IMAGE} environment: # - POSTGRES_PASSWORD - POSTGRES_USER=postgres - POSTGRES_DB=bonfire_db - POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password secrets: - postgres_password volumes: - db-data:/var/lib/postgresql/data networks: - internal search: image: getmeili/meilisearch:latest secrets: - meili_master_key volumes: - "search-data:/data.ms" networks: - internal entrypoint: ["tini", "--", "/docker-entrypoint.sh", "./meilisearch"] configs: - source: app_entrypoint target: /docker-entrypoint.sh mode: 0555 volumes: db-data: search-data: upload-data: networks: proxy: external: true internal: configs: app_entrypoint: name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION} file: entrypoint.sh.tmpl template_driver: golang secrets: postgres_password: external: true name: ${STACK_NAME}_postgres_password_${SECRET_POSTGRES_PASSWORD_VERSION} secret_key_base: external: true name: ${STACK_NAME}_secret_key_base_${SECRET_SECRET_KEY_BASE_VERSION} signing_salt: external: true name: ${STACK_NAME}_signing_salt_${SECRET_SIGNING_SALT_VERSION} encryption_salt: external: true name: ${STACK_NAME}_encryption_salt_${SECRET_ENCRYPTION_SALT_VERSION} meili_master_key: external: true name: ${STACK_NAME}_meili_master_key_${SECRET_MEILI_MASTER_KEY_VERSION} seeds_pw: external: true name: ${STACK_NAME}_seeds_pw_${SECRET_SEEDS_PW_VERSION} livebook_password: external: true name: ${STACK_NAME}_livebook_password_${SECRET_LIVEBOOK_PASSWORD_VERSION}