micrach/docker-compose.yml
Yanislav Igonin 79e6cc8e5b
Feature - Gateway (#12)
* feat: add geateway config

* feat: add ping controller for check by gateway

* feat: add new env vars for gateway

* feat: update config

* gateway request wip

* feat: add auth header for gateway request

* feat: separate gateway folder

* update endpoint for gateway

* add makefile

* lint

* swap png to svg

* add url of board to request to gateway

* change deployed path prefix

* add env in compose

* add body log on gateway connect
2022-02-28 10:18:44 +03:00

55 lines
1.8 KiB
YAML

version: "3.7"
services:
app:
image: ghcr.io/yanislav-igonin/micrach-go/micrach:latest
networks:
- web
environment:
ENV: release
PORT: ${PORT}
IS_DB_SEEDED: ${IS_DB_SEEDED}
IS_RATE_LIMITER_ENABLED: ${IS_RATE_LIMITER_ENABLED}
THREADS_MAX_COUNT: ${THREADS_MAX_COUNT}
POSTGRES_URL: ${POSTGRES_URL}
THREAD_BUMP_LIMIT: ${THREAD_BUMP_LIMIT}
IS_CAPTCHA_ACTIVE: ${IS_CAPTCHA_ACTIVE}
GATEWAY_URL: ${GATEWAY_URL}
GATEWAY_API_KEY: ${GATEWAY_API_KEY}
GATEWAY_BOARD_ID: ${GATEWAY_BOARD_ID}
GATEWAY_BOARD_URL: ${GATEWAY_BOARD_URL}
GATEWAY_BOARD_DESCRIPTION: ${GATEWAY_BOARD_DESCRIPTION}
volumes:
- /root/micrach-go/uploads:/app/uploads
deploy:
mode: global
placement:
constraints:
- node.role == manager
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
labels:
traefik.enable: "true"
traefik.docker.network: "web"
traefik.http.services.micrach.loadbalancer.server.port: ${PORT}
traefik.http.middlewares.micrach-https-redirect.redirectscheme.scheme: "https"
traefik.http.routers.micrach.entrypoints: "http"
traefik.http.routers.micrach.rule: "Host(`micrach.igonin.dev`) && PathPrefix(`/${GATEWAY_BOARD_ID}`)"
traefik.http.routers.micrach.middlewares: "micrach-https-redirect"
traefik.http.routers.micrach-secure.entrypoints: "https"
traefik.http.routers.micrach-secure.rule: "Host(`micrach.igonin.dev`) && PathPrefix(`/${GATEWAY_BOARD_ID}`)"
traefik.http.routers.micrach-secure.tls: "true"
traefik.http.routers.micrach-secure.service: "micrach"
networks:
web:
driver: overlay
external: true