2021-08-28 19:56:40 +03:00
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
services:
|
|
|
|
app:
|
|
|
|
image: ghcr.io/yanislav-igonin/micrach-go/micrach:latest
|
|
|
|
networks:
|
|
|
|
- web
|
|
|
|
environment:
|
|
|
|
ENV: release
|
|
|
|
PORT: ${PORT}
|
2022-02-06 20:37:20 +03:00
|
|
|
IS_DB_SEEDED: ${IS_DB_SEEDED}
|
2021-11-20 20:32:05 +03:00
|
|
|
IS_RATE_LIMITER_ENABLED: ${IS_RATE_LIMITER_ENABLED}
|
|
|
|
THREADS_MAX_COUNT: ${THREADS_MAX_COUNT}
|
2021-09-05 00:48:27 +03:00
|
|
|
POSTGRES_URL: ${POSTGRES_URL}
|
2022-02-28 10:18:44 +03:00
|
|
|
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}
|
2021-09-11 00:21:14 +03:00
|
|
|
volumes:
|
2021-09-11 01:01:03 +03:00
|
|
|
- /root/micrach-go/uploads:/app/uploads
|
2021-08-28 19:56:40 +03:00
|
|
|
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"
|
|
|
|
|
2021-08-28 20:02:32 +03:00
|
|
|
traefik.http.services.micrach.loadbalancer.server.port: ${PORT}
|
2021-08-28 19:56:40 +03:00
|
|
|
|
2022-02-28 12:22:08 +03:00
|
|
|
traefik.http.middlewares.haiku-bot-secure.stripprefix.prefixes: ${GATEWAY_BOARD_ID}
|
|
|
|
traefik.http.middlewares.haiku-bot-secure.stripprefix.forceSlash: false
|
2021-08-28 19:56:40 +03:00
|
|
|
traefik.http.middlewares.micrach-https-redirect.redirectscheme.scheme: "https"
|
|
|
|
|
|
|
|
traefik.http.routers.micrach.entrypoints: "http"
|
2022-02-28 12:22:08 +03:00
|
|
|
traefik.http.routers.micrach.rule: "Host(`micrach.igonin.dev`) && Path(`/${GATEWAY_BOARD_ID}`)"
|
2021-08-28 19:56:40 +03:00
|
|
|
traefik.http.routers.micrach.middlewares: "micrach-https-redirect"
|
|
|
|
|
|
|
|
traefik.http.routers.micrach-secure.entrypoints: "https"
|
2022-02-28 12:22:08 +03:00
|
|
|
traefik.http.routers.micrach-secure.rule: "Host(`micrach.igonin.dev`) && Path(`/${GATEWAY_BOARD_ID}`)"
|
2021-08-28 19:56:40 +03:00
|
|
|
traefik.http.routers.micrach-secure.tls: "true"
|
|
|
|
traefik.http.routers.micrach-secure.service: "micrach"
|
|
|
|
|
|
|
|
networks:
|
|
|
|
web:
|
|
|
|
driver: overlay
|
|
|
|
external: true
|