version: "3.8" x-environment: &default-env - PENPOT_PUBLIC_URI=https://{domain} - PENPOT_DATABASE_URI=postgresql://postgres/penpot - PENPOT_DATABASE_USERNAME=penpot - PENPOT_DATABASE_PASSWORD_FILE=/run/secrets/db_password - PENPOT_REDIS_URI=redis://redis/0 - PENPOT_STORAGE_BACKEND - PENPOT_STORAGE_FS_DIRECTORY=/opt/data/assets - PENPOT_TELEMETRY_ENABLED - PENPOT_SMTP_ENABLED - PENPOT_SMTP_DEFAULT_FROM - PENPOT_SMTP_DEFAULT_REPLY_TO - PENPOT_SMTP_HOST - PENPOT_SMTP_PORT - PENPOT_SMTP_USERNAME - PENPOT_SMTP_TLS - PENPOT_SMTP_SSL services: app: image: "penpotapp/frontend:1.7.1-alpha" networks: - proxy - backend volumes: - penpot_assets:/opt/data depends_on: - penpot-backend - penpot-exporter environment: *default-env entrypoint: /entrypoint.override.sh secrets: - db_password configs: - source: app_entrypoint target: /entrypoint.override.sh mode: 0555 deploy: restart_policy: condition: on-failure labels: - "traefik.enable=true" - "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80" - "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}" - coop-cloud.${STACK_NAME}.app.version=1.4.0-alpha-5d926f43 penpot-backend: image: "penpotapp/backend:1.7.1-alpha" volumes: - penpot_assets:/opt/data depends_on: - postgres - redis environment: *default-env secrets: - db_password configs: - source: backend_entrypoint target: /docker-entrypoint.sh mode: 0555 entrypoint: /docker-entrypoint.sh networks: - backend # FIXME 3wc: this is only required for email - proxy deploy: labels: - coop-cloud.${STACK_NAME}.penpot-backend.version=1.4.0-alpha- penpot-exporter: image: "penpotapp/exporter:1.7.1-alpha" environment: # Don't touch it; this uses internal docker network to # communicate with the frontend. - PENPOT_PUBLIC_URI=http://app networks: - backend deploy: labels: - coop-cloud.${STACK_NAME}.penpot-exporter.version=1.4.0-alpha-617c54da postgres: image: "postgres:13" stop_signal: SIGINT secrets: - db_password environment: - POSTGRES_INITDB_ARGS=--data-checksums - POSTGRES_DB=penpot - POSTGRES_USER=penpot - POSTGRES_PASSWORD_FILE=/run/secrets/db_password volumes: - postgres:/var/lib/postgresql/data networks: - backend deploy: labels: - coop-cloud.${STACK_NAME}.postgres.version=13-61d5d8ef redis: image: redis:6 networks: - backend deploy: labels: - coop-cloud.${STACK_NAME}.redis.version=6-e10f55f9 networks: proxy: external: true backend: volumes: postgres: penpot_assets: configs: app_entrypoint: name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_CONF_VERSION} file: entrypoint-app.sh backend_entrypoint: name: ${STACK_NAME}_backend_entrypoint_${BACKEND_ENTRYPOINT_CONF_VERSION} file: entrypoint-backend.sh secrets: db_password: external: true name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}