This repository has been archived on 2021-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
pubspace/compose.yml

53 lines
1.3 KiB
YAML
Raw Normal View History

2021-06-16 09:17:32 +00:00
---
version: "3.8"
services:
app:
image: "decentral1se/pubspace:latest"
environment:
- MASTODON_ACCESS_TOKEN_FILE=/run/secrets/access_token
2021-06-16 09:28:39 +00:00
- MASTODON_API_BASE_URL
- APP_LOG_LEVEL
2021-06-16 09:17:32 +00:00
secrets:
- access_token
networks:
- proxy
configs:
- source: entrypoint_sh
target: /usr/local/bin/entrypoint.sh
mode: 0555
entrypoint: /usr/local/bin/entrypoint.sh
healthcheck:
test: curl --fail 0.0.0.0:8000/healthz || exit 1
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
2021-06-16 09:28:39 +00:00
- "traefik.http.services.pubspace.loadbalancer.server.port=8000"
- "traefik.http.routers.pubspace.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.pubspace.entrypoints=web-secure"
- "traefik.http.routers.pubspace.tls.certresolver=production"
2021-06-16 09:17:32 +00:00
command: |
uvicorn
--host 0.0.0.0
--forwarded-allow-ips="*"
--proxy-headers
pubspace:app
networks:
proxy:
external: true
configs:
entrypoint_sh:
name: ${STACK_NAME}_entrypoint_conf_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
secrets:
access_token:
external: true
name: ${STACK_NAME}_access_token_${SECRET_MASTODON_ACCESS_TOKEN}