2023-03-06 01:44:22 +03:00
|
|
|
version: '3.7'
|
2022-05-17 20:29:12 +03:00
|
|
|
|
|
|
|
services:
|
2024-01-15 21:50:08 +03:00
|
|
|
tipi-docker-proxy:
|
|
|
|
container_name: tipi-docker-proxy
|
2024-02-02 20:20:16 +03:00
|
|
|
image: zoeyvid/docker-socket-proxy
|
2024-01-15 21:50:08 +03:00
|
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
|
|
- socket_proxy
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
environment:
|
|
|
|
POST: 1
|
|
|
|
CONTAINERS: 1
|
|
|
|
ALLOW_START: 1
|
|
|
|
ALLOW_STOP: 1
|
|
|
|
IMAGES: 1
|
|
|
|
NETWORKS: 1
|
|
|
|
|
2023-08-24 19:40:38 +03:00
|
|
|
tipi-reverse-proxy:
|
|
|
|
container_name: tipi-reverse-proxy
|
2024-01-15 21:50:08 +03:00
|
|
|
depends_on:
|
|
|
|
- tipi-docker-proxy
|
|
|
|
- tipi-dashboard
|
|
|
|
image: traefik:v2.11
|
|
|
|
restart: unless-stopped
|
2023-06-06 22:19:56 +03:00
|
|
|
ports:
|
|
|
|
- 80:80
|
|
|
|
- 443:443
|
|
|
|
- 8080:8080
|
|
|
|
command: --providers.docker
|
|
|
|
volumes:
|
2023-12-21 14:28:07 +03:00
|
|
|
- ./traefik:/root/.config
|
|
|
|
- ./traefik/shared:/shared
|
2023-06-06 22:19:56 +03:00
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
2024-01-15 21:50:08 +03:00
|
|
|
- socket_proxy
|
2023-06-06 22:19:56 +03:00
|
|
|
|
2022-06-20 22:04:42 +03:00
|
|
|
tipi-db:
|
|
|
|
container_name: tipi-db
|
2022-10-16 02:36:20 +03:00
|
|
|
image: postgres:14
|
2022-11-04 10:49:40 +03:00
|
|
|
restart: unless-stopped
|
2022-06-17 00:29:03 +03:00
|
|
|
stop_grace_period: 1m
|
|
|
|
volumes:
|
2022-12-15 17:18:25 +03:00
|
|
|
- pgdata:/var/lib/postgresql/data
|
2022-06-20 22:04:42 +03:00
|
|
|
ports:
|
|
|
|
- 5432:5432
|
2022-06-17 00:29:03 +03:00
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
2022-07-07 00:03:45 +03:00
|
|
|
POSTGRES_USER: tipi
|
|
|
|
POSTGRES_DB: tipi
|
2022-06-28 23:01:06 +03:00
|
|
|
healthcheck:
|
2023-03-06 01:44:22 +03:00
|
|
|
test: ['CMD-SHELL', 'pg_isready -d tipi -U tipi']
|
2022-06-28 23:01:06 +03:00
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 120
|
2022-06-17 00:29:03 +03:00
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
|
|
|
|
2022-10-21 00:10:50 +03:00
|
|
|
tipi-redis:
|
|
|
|
container_name: tipi-redis
|
2023-09-06 09:41:59 +03:00
|
|
|
image: redis:7.2.0
|
2022-10-21 00:10:50 +03:00
|
|
|
restart: unless-stopped
|
2024-02-02 20:20:16 +03:00
|
|
|
command: redis-server --requirepass ${REDIS_PASSWORD} --stop-writes-on-bgsave-error no
|
2022-11-08 21:25:08 +03:00
|
|
|
ports:
|
|
|
|
- 6379:6379
|
2022-10-21 00:10:50 +03:00
|
|
|
volumes:
|
2023-10-11 09:36:43 +03:00
|
|
|
- redisdata:/data
|
2023-04-13 00:46:12 +03:00
|
|
|
healthcheck:
|
|
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 120
|
2022-10-21 00:10:50 +03:00
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
|
|
|
|
2023-11-15 14:14:34 +03:00
|
|
|
tipi-worker:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: ./packages/worker/Dockerfile.dev
|
|
|
|
container_name: tipi-worker
|
|
|
|
healthcheck:
|
2024-01-22 18:42:49 +03:00
|
|
|
test: ['CMD', 'curl', '-f', 'http://localhost:3000/worker-api/healthcheck']
|
2023-11-15 14:14:34 +03:00
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 120
|
|
|
|
start_period: 5s
|
|
|
|
depends_on:
|
|
|
|
tipi-db:
|
|
|
|
condition: service_healthy
|
|
|
|
tipi-redis:
|
|
|
|
condition: service_healthy
|
2024-01-15 21:50:08 +03:00
|
|
|
tipi-docker-proxy:
|
|
|
|
condition: service_started
|
2023-11-15 14:14:34 +03:00
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
environment:
|
|
|
|
NODE_ENV: development
|
2024-01-09 23:09:41 +03:00
|
|
|
TIPI_VERSION: 0.0.0
|
2024-01-15 21:50:08 +03:00
|
|
|
DOCKER_HOST: tcp://tipi-docker-proxy:2375
|
2023-11-15 14:14:34 +03:00
|
|
|
volumes:
|
|
|
|
# Dev mode
|
2023-12-21 14:28:07 +03:00
|
|
|
- ./packages/worker/src:/app/packages/worker/src
|
2023-11-15 14:14:34 +03:00
|
|
|
# Production mode
|
|
|
|
- /proc:/host/proc:ro
|
2023-12-21 14:28:07 +03:00
|
|
|
- ./.env:/app/.env
|
|
|
|
- ./state:/app/state
|
|
|
|
- ./repos:/app/repos
|
|
|
|
- ./apps:/app/apps
|
2023-11-15 14:14:34 +03:00
|
|
|
- ${STORAGE_PATH:-$PWD}/app-data:/storage/app-data
|
2023-12-21 14:28:07 +03:00
|
|
|
- ./logs:/app/logs
|
|
|
|
- ./traefik:/app/traefik
|
|
|
|
- ./user-config:/app/user-config
|
2023-11-15 14:14:34 +03:00
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
2024-01-15 21:50:08 +03:00
|
|
|
- socket_proxy
|
2023-12-27 17:02:18 +03:00
|
|
|
labels:
|
|
|
|
traefik.enable: true
|
|
|
|
traefik.http.services.worker.loadbalancer.server.port: 3001
|
2024-01-22 18:42:49 +03:00
|
|
|
traefik.http.services.worker-api.loadbalancer.server.port: 3000
|
2023-12-27 17:02:18 +03:00
|
|
|
traefik.http.middlewares.redirect-to-https.redirectscheme.scheme: https
|
|
|
|
# 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
|
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
|
2023-12-27 17:02:18 +03:00
|
|
|
# secure
|
|
|
|
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
|
2023-11-15 14:14:34 +03:00
|
|
|
|
2023-08-24 19:40:38 +03:00
|
|
|
tipi-dashboard:
|
2022-05-17 20:29:12 +03:00
|
|
|
build:
|
2022-06-03 23:42:23 +03:00
|
|
|
context: .
|
2022-05-17 20:29:12 +03:00
|
|
|
dockerfile: Dockerfile.dev
|
2023-08-24 19:40:38 +03:00
|
|
|
container_name: tipi-dashboard
|
2024-01-09 14:04:48 +03:00
|
|
|
restart: unless-stopped
|
2022-09-25 01:06:13 +03:00
|
|
|
depends_on:
|
2022-12-27 00:05:04 +03:00
|
|
|
tipi-db:
|
|
|
|
condition: service_healthy
|
2023-04-13 00:46:12 +03:00
|
|
|
tipi-redis:
|
|
|
|
condition: service_healthy
|
2023-11-15 14:14:34 +03:00
|
|
|
tipi-worker:
|
|
|
|
condition: service_healthy
|
2023-08-15 23:49:50 +03:00
|
|
|
env_file:
|
|
|
|
- .env
|
2022-12-26 06:31:44 +03:00
|
|
|
environment:
|
2023-01-23 21:54:56 +03:00
|
|
|
NODE_ENV: development
|
2024-01-09 23:09:41 +03:00
|
|
|
TIPI_VERSION: 0.0.0
|
2024-02-03 13:08:39 +03:00
|
|
|
NEXT_PUBLIC_TIPI_VERSION: 0.0.0
|
2022-05-17 20:29:12 +03:00
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
2023-03-28 22:27:05 +03:00
|
|
|
ports:
|
|
|
|
- 3000:3000
|
2022-05-17 20:29:12 +03:00
|
|
|
volumes:
|
2022-06-22 22:28:48 +03:00
|
|
|
# - /dashboard/node_modules
|
|
|
|
# - /dashboard/.next
|
2023-12-21 14:28:07 +03:00
|
|
|
- ./.env:/runtipi/.env
|
|
|
|
- ./src:/app/src
|
|
|
|
- ./packages:/app/packages
|
|
|
|
- ./state:/runtipi/state
|
|
|
|
- ./repos:/runtipi/repos:ro
|
|
|
|
- ./apps:/runtipi/apps
|
|
|
|
- ./logs:/app/logs
|
|
|
|
- ./traefik:/runtipi/traefik
|
2023-11-15 14:14:34 +03:00
|
|
|
- ${STORAGE_PATH:-$PWD}:/app/storage
|
2023-06-06 22:19:56 +03:00
|
|
|
labels:
|
|
|
|
traefik.enable: true
|
2023-06-06 22:47:51 +03:00
|
|
|
traefik.http.services.dashboard.loadbalancer.server.port: 3000
|
|
|
|
traefik.http.middlewares.redirect-to-https.redirectscheme.scheme: https
|
2023-12-27 17:02:18 +03:00
|
|
|
# Local ip
|
|
|
|
traefik.http.routers.dashboard.rule: PathPrefix("/")
|
|
|
|
traefik.http.routers.dashboard.service: dashboard
|
|
|
|
traefik.http.routers.dashboard.entrypoints: web
|
2023-06-06 22:19:56 +03:00
|
|
|
# Local domain
|
|
|
|
traefik.http.routers.dashboard-local-insecure.rule: Host(`${LOCAL_DOMAIN}`)
|
|
|
|
traefik.http.routers.dashboard-local-insecure.entrypoints: web
|
2023-06-06 22:47:51 +03:00
|
|
|
traefik.http.routers.dashboard-local-insecure.service: dashboard
|
2023-06-06 22:19:56 +03:00
|
|
|
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
|
2023-06-06 22:47:51 +03:00
|
|
|
traefik.http.routers.dashboard-local.service: dashboard
|
2022-05-17 20:29:12 +03:00
|
|
|
|
|
|
|
networks:
|
|
|
|
tipi_main_network:
|
|
|
|
driver: bridge
|
2023-09-10 15:02:21 +03:00
|
|
|
name: runtipi_tipi_main_network
|
2024-01-15 21:50:08 +03:00
|
|
|
socket_proxy:
|
|
|
|
name: runtipi_socket_proxy
|
2023-09-10 15:02:21 +03:00
|
|
|
|
2022-12-15 17:18:25 +03:00
|
|
|
volumes:
|
2022-12-26 06:31:44 +03:00
|
|
|
pgdata:
|
2023-10-11 09:36:43 +03:00
|
|
|
redisdata:
|