2022-09-18 13:56:56 +00:00
|
|
|
---
|
|
|
|
services:
|
2022-09-19 07:17:08 +00:00
|
|
|
kuttit:
|
|
|
|
image: kutt/kutt:${KUTTIT_VERSION}
|
2022-09-18 13:56:56 +00:00
|
|
|
restart: unless-stopped
|
2022-09-19 07:17:08 +00:00
|
|
|
command: ["./wait-for-it.sh", "postgres:5432", "--", "npm", "start"]
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
- redis
|
|
|
|
environment:
|
|
|
|
- PORT=${TRAEFIK_SERVICE_PORT}
|
|
|
|
- SITE_NAME=${KUTTIT_NAME}
|
|
|
|
- DEFAULT_DOMAIN=${KUTTIT_DOMAIN}
|
|
|
|
- LINK_LENGTH=${KUTTIT_LINK_LENGTH}
|
|
|
|
- DB_HOST=postgres
|
|
|
|
- DB_PORT=5432
|
|
|
|
- DB_NAME=${POSTGRES_NAME}
|
|
|
|
- DB_USER=${POSTGRES_USER}
|
|
|
|
- DB_PASSWORD=${POSTGRES_PASS}
|
|
|
|
- DB_SSL=false
|
|
|
|
- REDIS_HOST=redis
|
|
|
|
- REDIS_PORT=6379
|
|
|
|
- REDIS_PASSWORD=${REDIS_PASS}
|
|
|
|
- DISALLOW_REGISTRATION=${KUTTIT_DISABLE_REGISTRATION}
|
|
|
|
- DISALLOW_ANONYMOUS_LINKS=${KUTTIT_DISABLE_ANONYMOUS}
|
|
|
|
- USER_LIMIT_PER_DAY=${KUTTIT_DAILY_USER_LIMIT}
|
|
|
|
- NON_USER_COOLDOWN=${KUTTIT_NON_USER_COOLDOWN}
|
|
|
|
- DEFAULT_MAX_STATS_PER_LINK=${KUTTIT_LINK_STATS}
|
|
|
|
- CUSTOM_DOMAIN_USE_HTTPS=${KUTTIT_DOMAIN_HTTPS}
|
|
|
|
- JWT_SECRET=${KUTTIT_JWT_SECRET}
|
|
|
|
- ADMIN_EMAILS=${KUTTIT_ADMIN_EMAILS}
|
|
|
|
- MAIL_HOST=${KUTTIT_MAIL_HOST}
|
|
|
|
- MAIL_PORT=${KUTTIT_MAIL_PORT}
|
|
|
|
- MAIL_FROM=${KUTTIT_MAIL_FROM}
|
|
|
|
- MAIL_USER=${KUTTIT_MAIL_USER}
|
|
|
|
- MAIL_PASSWORD=${KUTTIT_MAIL_PASS}
|
|
|
|
- MAIL_SECURE=${KUTTIT_MAIL_SECURE}
|
|
|
|
- REPORT_EMAIL=${KUTTIT_REPORT_EMAIL}
|
|
|
|
- CONTACT_EMAIL=${KUTTIT_CONTACT_EMAIL}
|
2022-09-18 13:56:56 +00:00
|
|
|
labels:
|
|
|
|
### Section Træfik
|
|
|
|
- traefik.enable=${TRAEFIK_ENABLED}
|
|
|
|
- traefik.docker.network=${TRAEFIK_NETWORK}
|
|
|
|
## HTTP
|
|
|
|
- traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http
|
|
|
|
# redirect to HTTPS only
|
|
|
|
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=${TRAEFIK_HTTP_MIDDLEWARES}
|
|
|
|
- traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=${TRAEFIK_MATCHRULE}
|
|
|
|
## HTTPS
|
|
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https
|
|
|
|
# configure the exposed service
|
|
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.middlewares=${TRAEFIK_HTTPS_MIDDLEWARES}
|
|
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=${TRAEFIK_MATCHRULE}
|
|
|
|
# enable TLS and its certificate provider
|
|
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls=${TRAEFIK_TLSENABLED}
|
|
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls.certresolver=${TRAEFIK_CERTRESOLVER}
|
|
|
|
# specify a service so a custom port can be used
|
|
|
|
- traefik.http.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=${TRAEFIK_SERVICE_PORT}
|
|
|
|
### Section Diun
|
2022-09-19 07:17:08 +00:00
|
|
|
- diun.enable=${DIUN_KUTTIT_ENABLE}
|
|
|
|
- diun.watch_repo=${DIUN_KUTTIT_WATCHREPO}
|
|
|
|
- diun.sort_tags=${DIUN_KUTTIT_SORTALGO}
|
|
|
|
- diun.include_tags=${DIUN_KUTTIT_INCLUDE}
|
|
|
|
- diun.exclude_tags=${DIUN_KUTTIT_EXCLUDE}
|
2022-09-18 13:56:56 +00:00
|
|
|
networks:
|
2022-09-19 07:17:08 +00:00
|
|
|
- internal
|
2022-09-18 13:56:56 +00:00
|
|
|
- traefik
|
|
|
|
|
2022-09-19 07:17:08 +00:00
|
|
|
redis:
|
|
|
|
image: redis:${REDIS_VERSION}
|
|
|
|
restart: unless-stopped
|
|
|
|
command: --requirepass ${REDIS_PASS}
|
|
|
|
environment:
|
|
|
|
- REDIS_PASS=${REDIS_PASS}
|
|
|
|
labels:
|
|
|
|
### Section Diun
|
|
|
|
- diun.enable=${DIUN_REDIS_ENABLE}
|
|
|
|
- diun.watch_repo=${DIUN_REDIS_WATCHREPO}
|
|
|
|
- diun.sort_tags=${DIUN_REDIS_SORTALGO}
|
|
|
|
- diun.include_tags=${DIUN_REDIS_INCLUDE}
|
|
|
|
- diun.exclude_tags=${DIUN_REDIS_EXCLUDE}
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
volumes:
|
|
|
|
- ${REDIS_DATA}:/data
|
|
|
|
|
|
|
|
postgres:
|
|
|
|
image: postgres:${POSTGRES_VERSION}
|
|
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
|
|
- POSTGRES_DB=${POSTGRES_NAME}
|
|
|
|
- POSTGRES_USER=${POSTGRES_USER}
|
|
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASS}
|
|
|
|
labels:
|
|
|
|
### Section Diun
|
|
|
|
- diun.enable=${DIUN_POSTGRES_ENABLE}
|
|
|
|
- diun.watch_repo=${DIUN_POSTGRES_WATCHREPO}
|
|
|
|
- diun.sort_tags=${DIUN_POSTGRES_SORTALGO}
|
|
|
|
- diun.include_tags=${DIUN_POSTGRES_INCLUDE}
|
|
|
|
- diun.exclude_tags=${DIUN_POSTGRES_EXCLUDE}
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
volumes:
|
|
|
|
- ${POSTGRES_DATA}:/var/lib/postgresql/data
|
|
|
|
|
2022-09-18 13:56:56 +00:00
|
|
|
networks:
|
2022-09-19 07:17:08 +00:00
|
|
|
internal:
|
2022-09-18 13:56:56 +00:00
|
|
|
traefik:
|
|
|
|
external: true
|
|
|
|
name: ${TRAEFIK_NETWORK}
|