docker-compose.dev.yml
Rama develop · réplica de lectura del repositorio original.
services:
runtipi-reverse-proxy:
depends_on:
runtipi:
condition: service_healthy
image: traefik:v3.7.16
restart: unless-stopped
ports:
- ${RUNTIPI_HTTP_PORT:-80}:80
- ${RUNTIPI_HTTPS_PORT:-443}:443
- ${RUNTIPI_TRAEFIK_DASHBOARD_PORT:-8080}:8080
command: --providers.docker --log.level=DEBUG --log.filePath=/dev/null
volumes:
- ./.internal/traefik:/etc/traefik
- ./.internal/traefik/shared:/shared
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- tipi_main_network
runtipi-db:
image: postgres:14
restart: unless-stopped
stop_grace_period: 1m
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- ${RUNTIPI_DB_PORT:-5432}:5432
environment:
POSTGRES_PASSWORD: postgres
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
runtipi-queue:
image: rabbitmq:4-alpine
restart: unless-stopped
environment:
RABBITMQ_DEFAULT_USER: tipi
RABBITMQ_DEFAULT_PASS: tipi
networks:
- tipi_main_network
runtipi:
build:
context: .
dockerfile: Dockerfile.dev
depends_on:
runtipi-db:
condition: service_healthy
runtipi-queue:
condition: service_started
restart: unless-stopped
stop_grace_period: 1h
healthcheck:
start_period: 10s
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/health']
interval: 5s
timeout: 3s
retries: 20
ports:
- ${RUNTIPI_DEV_PORT:-3000}:8080
volumes:
# Hot reload
- ./packages/backend/src:/app/packages/backend/src
- ./packages/frontend/src:/app/packages/frontend/src
- ./packages/common/src:/app/packages/common/src
# Data
- ${RUNTIPI_MEDIA_PATH:-.internal}/media:/data/media
- ${RUNTIPI_STATE_PATH:-.internal}/state:/data/state
- ${RUNTIPI_REPOS_PATH:-.internal}/repos:/data/repos
- ${RUNTIPI_APPS_PATH:-.internal}/apps:/data/apps
- ${RUNTIPI_LOGS_PATH:-.internal}/logs:/data/logs
- ${RUNTIPI_TRAEFIK_PATH:-.internal}/traefik:/data/traefik
- ${RUNTIPI_USER_CONFIG_PATH:-.internal}/user-config:/data/user-config
- ${RUNTIPI_APP_DATA_PATH:-.internal}/app-data:/app-data
- ${RUNTIPI_BACKUPS_PATH:-.internal}/backups:/data/backups
- runtipi_auth:/data/.secrets
# Static
- ./.env:/data/.env
- ./.internal/cache:/cache
- ./docker-compose.dev.yml:/data/docker-compose.yml
- /var/run/docker.sock:/var/run/docker.sock:ro
- /proc/meminfo:/host/proc/meminfo:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
networks:
- tipi_main_network
environment:
LOCAL: true
NODE_ENV: development
ROOT_FOLDER_HOST: ${PWD}/.internal
POSTGRES_PASSWORD: postgres
RABBITMQ_USERNAME: tipi
RABBITMQ_PASSWORD: tipi
RABBITMQ_HOST: runtipi-queue
RUNTIPI_DOCKER_NETWORK: ${RUNTIPI_DOCKER_NETWORK:-runtipi_tipi_main_network}
INTERNAL_IP: 127.0.0.1
TIPI_VERSION: 4.5.0
LOG_LEVEL: debug
env_file:
- path: .env
required: false
labels:
# ---- General ----- #
runtipi.managed: true
traefik.enable: true
traefik.http.middlewares.redirect-to-https.redirectscheme.scheme: https
# ---- Dashboard ----- #
traefik.http.services.dashboard.loadbalancer.server.port: 8080
# Local ip
traefik.http.routers.dashboard.rule: PathPrefix("/")
traefik.http.routers.dashboard.service: dashboard
traefik.http.routers.dashboard.entrypoints: web
# 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
# 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
# Middlewares
traefik.http.middlewares.runtipi.forwardauth.address: ${RUNTIPI_FORWARD_AUTH_URL:-http://runtipi:3000/api/auth/traefik}
traefik.http.middlewares.runtipi.forwardauth.authRequestHeaders: Cookie
traefik.http.middlewares.runtipi.forwardauth.maxResponseBodySize: '8192'
networks:
tipi_main_network:
driver: bridge
name: ${RUNTIPI_DOCKER_NETWORK:-runtipi_tipi_main_network}
volumes:
runtipi_auth:
pgdata: