2023-10-11 09:36:43 +03:00
|
|
|
services:
|
2024-03-03 21:05:09 +03:00
|
|
|
runtipi-reverse-proxy:
|
|
|
|
container_name: runtipi-reverse-proxy
|
2024-01-15 21:50:08 +03:00
|
|
|
depends_on:
|
2024-03-19 20:49:20 +03:00
|
|
|
runtipi:
|
|
|
|
condition: service_healthy
|
2024-05-02 11:38:54 +03:00
|
|
|
image: traefik:v3.0
|
2024-01-15 21:50:08 +03:00
|
|
|
restart: unless-stopped
|
2023-10-11 09:36:43 +03:00
|
|
|
ports:
|
|
|
|
- 80:80
|
|
|
|
- 443:443
|
|
|
|
- 8080:8080
|
|
|
|
command: --providers.docker
|
|
|
|
volumes:
|
2024-02-07 00:13:21 +03:00
|
|
|
- ./traefik:/etc/traefik
|
2023-12-19 23:31:50 +03:00
|
|
|
- ./traefik/shared:/shared
|
2024-02-09 20:51:58 +03:00
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
2023-10-11 09:36:43 +03:00
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
|
|
|
|
2024-03-03 21:05:09 +03:00
|
|
|
runtipi-db:
|
|
|
|
container_name: runtipi-db
|
2023-10-11 09:36:43 +03:00
|
|
|
image: postgres:14
|
|
|
|
restart: unless-stopped
|
|
|
|
stop_grace_period: 1m
|
|
|
|
volumes:
|
|
|
|
- pgdata:/var/lib/postgresql/data
|
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
|
|
POSTGRES_USER: tipi
|
|
|
|
POSTGRES_DB: tipi
|
|
|
|
healthcheck:
|
|
|
|
test: ['CMD-SHELL', 'pg_isready -d tipi -U tipi']
|
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 120
|
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
|
|
|
|
2024-03-03 21:05:09 +03:00
|
|
|
runtipi-redis:
|
|
|
|
container_name: runtipi-redis
|
2023-10-11 09:36:43 +03:00
|
|
|
image: redis:7.2.0
|
|
|
|
restart: unless-stopped
|
2024-02-02 20:20:16 +03:00
|
|
|
command: redis-server --requirepass ${REDIS_PASSWORD} --stop-writes-on-bgsave-error no
|
2023-10-11 09:36:43 +03:00
|
|
|
ports:
|
|
|
|
- 6379:6379
|
|
|
|
volumes:
|
|
|
|
- redisdata:/data
|
|
|
|
healthcheck:
|
|
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 120
|
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
|
|
|
|
2024-03-03 21:05:09 +03:00
|
|
|
runtipi:
|
2023-11-15 14:14:34 +03:00
|
|
|
build:
|
|
|
|
context: .
|
2024-03-03 21:05:09 +03:00
|
|
|
dockerfile: Dockerfile
|
2023-12-19 22:49:39 +03:00
|
|
|
args:
|
2024-03-21 19:57:15 +03:00
|
|
|
LOCAL: true
|
2024-05-30 09:44:59 +03:00
|
|
|
TIPI_VERSION: development
|
2024-03-03 21:05:09 +03:00
|
|
|
container_name: runtipi
|
2024-03-19 20:49:20 +03:00
|
|
|
healthcheck:
|
|
|
|
test: ['CMD', 'curl', '-f', 'http://localhost:5000/worker-api/healthcheck']
|
|
|
|
interval: 5s
|
|
|
|
timeout: 3s
|
|
|
|
retries: 20
|
2024-03-03 21:05:09 +03:00
|
|
|
restart: unless-stopped
|
2024-03-18 00:05:04 +03:00
|
|
|
depends_on:
|
|
|
|
runtipi-db:
|
|
|
|
condition: service_healthy
|
|
|
|
runtipi-redis:
|
|
|
|
condition: service_healthy
|
2023-11-15 14:14:34 +03:00
|
|
|
env_file:
|
|
|
|
- .env
|
2024-03-03 21:05:09 +03:00
|
|
|
volumes:
|
|
|
|
# Data
|
2024-04-19 22:42:48 +03:00
|
|
|
- ${RUNTIPI_MEDIA_PATH:-.}/media:/data/media
|
|
|
|
- ${RUNTIPI_STATE_PATH:-.}/state:/data/state
|
|
|
|
- ${RUNTIPI_REPOS_PATH:-.}/repos:/data/repos
|
|
|
|
- ${RUNTIPI_APPS_PATH:-.}/apps:/data/apps
|
|
|
|
- ${RUNTIPI_LOGS_PATH:-.}/logs:/data/logs
|
|
|
|
- ${RUNTIPI_TRAEFIK_PATH:-.}/traefik:/data/traefik
|
|
|
|
- ${RUNTIPI_USER_CONFIG_PATH:-.}/user-config:/data/user-config
|
|
|
|
- ${RUNTIPI_APP_DATA_PATH:-.}/app-data:/app-data
|
2024-07-24 22:30:47 +03:00
|
|
|
- ${RUNTIPI_BACKUPS_PATH:-.}/backups:/data/backups
|
2024-03-03 21:05:09 +03:00
|
|
|
# Static
|
|
|
|
- ./.env:/data/.env
|
2024-05-30 23:03:57 +03:00
|
|
|
- ./docker-compose.prod.yml:/data/docker-compose.yml
|
2024-03-03 21:05:09 +03:00
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
2024-05-30 09:44:59 +03:00
|
|
|
- /proc:/host/proc:ro
|
2024-07-21 00:46:50 +03:00
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
- /etc/timezone:/etc/timezone:ro
|
2023-11-15 14:14:34 +03:00
|
|
|
environment:
|
2024-03-21 19:57:15 +03:00
|
|
|
LOCAL: true
|
2024-05-30 09:44:59 +03:00
|
|
|
NODE_ENV: production
|
2023-11-15 14:14:34 +03:00
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
2024-03-03 21:05:09 +03:00
|
|
|
ports:
|
|
|
|
- 3000:3000
|
2023-12-27 17:02:18 +03:00
|
|
|
labels:
|
2024-03-03 21:05:09 +03:00
|
|
|
# ---- General ----- #
|
2023-12-27 17:02:18 +03:00
|
|
|
traefik.enable: true
|
|
|
|
traefik.http.middlewares.redirect-to-https.redirectscheme.scheme: https
|
2024-03-03 21:05:09 +03:00
|
|
|
|
|
|
|
# ---- Dashboard ----- #
|
|
|
|
traefik.http.services.dashboard.loadbalancer.server.port: 3000
|
|
|
|
# Local ip
|
|
|
|
traefik.http.routers.dashboard.rule: PathPrefix("/")
|
|
|
|
traefik.http.routers.dashboard.service: dashboard
|
|
|
|
traefik.http.routers.dashboard.entrypoints: web
|
2024-03-24 22:17:59 +03:00
|
|
|
# Websecure
|
|
|
|
traefik.http.routers.dashboard-insecure.rule: Host(`${DOMAIN}`) && PathPrefix(`/`)
|
|
|
|
traefik.http.routers.dashboard-insecure.service: dashboard
|
|
|
|
traefik.http.routers.dashboard-insecure.entrypoints: web
|
|
|
|
traefik.http.routers.dashboard-insecure.middlewares: redirect-to-https
|
|
|
|
traefik.http.routers.dashboard-secure.rule: Host(`${DOMAIN}`) && PathPrefix(`/`)
|
|
|
|
traefik.http.routers.dashboard-secure.service: dashboard
|
|
|
|
traefik.http.routers.dashboard-secure.entrypoints: websecure
|
|
|
|
traefik.http.routers.dashboard-secure.tls.certresolver: myresolver
|
2024-03-03 21:05:09 +03:00
|
|
|
# Local domain
|
|
|
|
traefik.http.routers.dashboard-local-insecure.rule: Host(`${LOCAL_DOMAIN}`)
|
|
|
|
traefik.http.routers.dashboard-local-insecure.entrypoints: web
|
|
|
|
traefik.http.routers.dashboard-local-insecure.service: dashboard
|
|
|
|
traefik.http.routers.dashboard-local-insecure.middlewares: redirect-to-https
|
|
|
|
# Secure
|
|
|
|
traefik.http.routers.dashboard-local.rule: Host(`${LOCAL_DOMAIN}`)
|
|
|
|
traefik.http.routers.dashboard-local.entrypoints: websecure
|
|
|
|
traefik.http.routers.dashboard-local.tls: true
|
|
|
|
traefik.http.routers.dashboard-local.service: dashboard
|
|
|
|
|
|
|
|
# ---- Worker ----- #
|
|
|
|
traefik.http.services.worker.loadbalancer.server.port: 5001
|
|
|
|
traefik.http.services.worker-api.loadbalancer.server.port: 5000
|
2023-12-27 17:02:18 +03:00
|
|
|
# Local ip
|
|
|
|
traefik.http.routers.worker.rule: PathPrefix("/worker")
|
|
|
|
traefik.http.routers.worker.service: worker
|
|
|
|
traefik.http.routers.worker.entrypoints: web
|
2024-01-22 18:42:49 +03:00
|
|
|
traefik.http.routers.worker-api.rule: PathPrefix("/worker-api")
|
|
|
|
traefik.http.routers.worker-api.service: worker-api
|
|
|
|
traefik.http.routers.worker-api.entrypoints: web
|
2024-03-24 22:17:59 +03:00
|
|
|
# Websecure
|
|
|
|
traefik.http.routers.worker-insecure.rule: Host(`${DOMAIN}`) && PathPrefix(`/worker`)
|
|
|
|
traefik.http.routers.worker-insecure.service: worker
|
|
|
|
traefik.http.routers.worker-insecure.entrypoints: web
|
|
|
|
traefik.http.routers.worker-insecure.middlewares: redirect-to-https
|
|
|
|
traefik.http.routers.worker-secure.rule: Host(`${DOMAIN}`) && PathPrefix(`/worker`)
|
|
|
|
traefik.http.routers.worker-secure.service: worker
|
|
|
|
traefik.http.routers.worker-secure.entrypoints: websecure
|
|
|
|
traefik.http.routers.worker-secure.tls.certresolver: myresolver
|
|
|
|
traefik.http.routers.worker-api-insecure.rule: Host(`${DOMAIN}`) && PathPrefix(`/worker-api`)
|
|
|
|
traefik.http.routers.worker-api-insecure.service: worker-api
|
|
|
|
traefik.http.routers.worker-api-insecure.entrypoints: web
|
|
|
|
traefik.http.routers.worker-api-insecure.middlewares: redirect-to-https
|
|
|
|
traefik.http.routers.worker-api-secure.rule: Host(`${DOMAIN}`) && PathPrefix(`/worker-api`)
|
|
|
|
traefik.http.routers.worker-api-secure.service: worker-api
|
|
|
|
traefik.http.routers.worker-api-secure.entrypoints: websecure
|
|
|
|
traefik.http.routers.worker-api-secure.tls.certresolver: myresolver
|
2023-12-27 17:02:18 +03:00
|
|
|
# Local domain
|
|
|
|
traefik.http.routers.worker-local-insecure.rule: Host(`${LOCAL_DOMAIN}`) && PathPrefix("/worker")
|
|
|
|
traefik.http.routers.worker-local-insecure.entrypoints: web
|
|
|
|
traefik.http.routers.worker-local-insecure.service: worker
|
|
|
|
traefik.http.routers.worker-local-insecure.middlewares: redirect-to-https
|
2024-01-22 18:42:49 +03:00
|
|
|
traefik.http.routers.worker-api-local-insecure.rule: Host(`${LOCAL_DOMAIN}`) && PathPrefix("/worker-api")
|
|
|
|
traefik.http.routers.worker-api-local-insecure.entrypoints: web
|
|
|
|
traefik.http.routers.worker-api-local-insecure.service: worker-api
|
|
|
|
traefik.http.routers.worker-api-local-insecure.middlewares: redirect-to-https
|
2024-03-03 21:05:09 +03:00
|
|
|
# Secure
|
2023-12-27 17:02:18 +03:00
|
|
|
traefik.http.routers.worker-local.rule: Host(`${LOCAL_DOMAIN}`) && PathPrefix("/worker")
|
|
|
|
traefik.http.routers.worker-local.entrypoints: websecure
|
|
|
|
traefik.http.routers.worker-local.tls: true
|
|
|
|
traefik.http.routers.worker-local.service: worker
|
2024-01-22 18:42:49 +03:00
|
|
|
traefik.http.routers.worker-api-local.rule: Host(`${LOCAL_DOMAIN}`) && PathPrefix("/worker-api")
|
|
|
|
traefik.http.routers.worker-api-local.entrypoints: websecure
|
|
|
|
traefik.http.routers.worker-api-local.tls: true
|
2024-03-09 21:14:07 +03:00
|
|
|
traefik.http.routers.worker-api-local.service: worker-api
|
2023-11-15 14:14:34 +03:00
|
|
|
|
2023-10-11 09:36:43 +03:00
|
|
|
networks:
|
|
|
|
tipi_main_network:
|
|
|
|
driver: bridge
|
|
|
|
name: runtipi_tipi_main_network
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
pgdata:
|
|
|
|
redisdata:
|