2022-09-09 13:50:15 +00:00
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
services:
|
|
|
|
teddit:
|
|
|
|
image: teddit/teddit:latest
|
|
|
|
container_name: teddit
|
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
|
|
|
ports:
|
|
|
|
- ${APP_PORT}:8080
|
|
|
|
depends_on:
|
|
|
|
- teddit-redis
|
|
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
|
|
- REDIS_HOST=teddit-redis
|
|
|
|
- DOMAIN=${APP_DOMAIN}
|
|
|
|
- THEME=dark
|
|
|
|
- HTTPS_ENABLED=false
|
|
|
|
- REDIRECT_HTTP_TO_HTTPS=false
|
|
|
|
- REDIRECT_WWW=false
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:8080/about"]
|
|
|
|
interval: 1m
|
|
|
|
timeout: 3s
|
|
|
|
labels:
|
2023-06-18 16:02:29 +00:00
|
|
|
# Main
|
|
|
|
traefik.enable: true
|
|
|
|
traefik.http.middlewares.teddit-web-redirect.redirectscheme.scheme: https
|
|
|
|
traefik.http.services.teddit.loadbalancer.server.port: 8080
|
|
|
|
# Web
|
|
|
|
traefik.http.routers.teddit-insecure.rule: Host(`${APP_DOMAIN}`)
|
|
|
|
traefik.http.routers.teddit-insecure.entrypoints: web
|
|
|
|
traefik.http.routers.teddit-insecure.service: teddit
|
|
|
|
traefik.http.routers.teddit-insecure.middlewares: teddit-web-redirect
|
|
|
|
# Websecure
|
2022-09-09 13:50:15 +00:00
|
|
|
traefik.http.routers.teddit.rule: Host(`${APP_DOMAIN}`)
|
|
|
|
traefik.http.routers.teddit.entrypoints: websecure
|
|
|
|
traefik.http.routers.teddit.service: teddit
|
|
|
|
traefik.http.routers.teddit.tls.certresolver: myresolver
|
2023-06-18 16:02:29 +00:00
|
|
|
# Local domain
|
|
|
|
traefik.http.routers.teddit-local-insecure.rule: Host(`teddit.${LOCAL_DOMAIN}`)
|
|
|
|
traefik.http.routers.teddit-local-insecure.entrypoints: web
|
|
|
|
traefik.http.routers.teddit-local-insecure.service: teddit
|
|
|
|
traefik.http.routers.teddit-local-insecure.middlewares: teddit-web-redirect
|
|
|
|
# Local domain secure
|
|
|
|
traefik.http.routers.teddit-local.rule: Host(`teddit.${LOCAL_DOMAIN}`)
|
|
|
|
traefik.http.routers.teddit-local.entrypoints: websecure
|
|
|
|
traefik.http.routers.teddit-local.service: teddit
|
|
|
|
traefik.http.routers.teddit-local.tls: true
|
2022-09-09 13:50:15 +00:00
|
|
|
|
|
|
|
teddit-redis:
|
|
|
|
image: redis:alpine
|
|
|
|
container_name: teddit-redis
|
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
|
|
- ${APP_DATA_DIR}/data/redis:/data
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
|
|
interval: 1s
|
|
|
|
timeout: 3s
|
|
|
|
retries: 30
|
2022-09-10 10:37:04 +00:00
|
|
|
networks:
|
|
|
|
- tipi_main_network
|