2022-05-17 17:29:12 +00:00
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
services:
|
2022-06-20 19:04:42 +00:00
|
|
|
tipi-db:
|
|
|
|
container_name: tipi-db
|
2022-06-16 21:29:03 +00:00
|
|
|
image: postgres:latest
|
|
|
|
restart: on-failure
|
|
|
|
stop_grace_period: 1m
|
|
|
|
volumes:
|
|
|
|
- ./data/postgres:/var/lib/postgresql/data
|
2022-06-20 19:04:42 +00:00
|
|
|
ports:
|
|
|
|
- 5432:5432
|
2022-06-16 21:29:03 +00:00
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
2022-07-06 21:03:45 +00:00
|
|
|
POSTGRES_USER: tipi
|
|
|
|
POSTGRES_DB: tipi
|
2022-06-28 20:01:06 +00:00
|
|
|
healthcheck:
|
2022-07-06 09:15:35 +00:00
|
|
|
test: [ "CMD-SHELL", "pg_isready -d tipi -U tipi" ]
|
2022-06-28 20:01:06 +00:00
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 120
|
2022-06-16 21:29:03 +00:00
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
|
|
|
|
2022-05-17 17:29:12 +00:00
|
|
|
api:
|
|
|
|
build:
|
2022-06-03 20:42:23 +00:00
|
|
|
context: .
|
2022-05-17 17:29:12 +00:00
|
|
|
dockerfile: Dockerfile.dev
|
2022-07-06 21:03:45 +00:00
|
|
|
command: /bin/sh -c "cd /api && npm run build && npm run dev"
|
2022-06-16 21:29:03 +00:00
|
|
|
depends_on:
|
2022-06-28 20:01:06 +00:00
|
|
|
tipi-db:
|
|
|
|
condition: service_healthy
|
2022-05-17 17:29:12 +00:00
|
|
|
container_name: api
|
|
|
|
ports:
|
|
|
|
- 3001:3001
|
|
|
|
volumes:
|
|
|
|
## Docker sock
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
- ${PWD}:/tipi
|
2022-06-22 19:28:48 +00:00
|
|
|
- ${PWD}/packages/system-api/src:/api/src
|
|
|
|
# - /api/node_modules
|
2022-05-17 17:29:12 +00:00
|
|
|
environment:
|
2022-06-16 21:29:03 +00:00
|
|
|
INTERNAL_IP: ${INTERNAL_IP}
|
|
|
|
TIPI_VERSION: ${TIPI_VERSION}
|
|
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
|
|
ROOT_FOLDER_HOST: ${ROOT_FOLDER_HOST}
|
|
|
|
NGINX_PORT: ${NGINX_PORT}
|
2022-07-06 21:03:45 +00:00
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
2022-07-06 09:15:35 +00:00
|
|
|
POSTGRES_USERNAME: tipi
|
2022-07-06 21:03:45 +00:00
|
|
|
POSTGRES_DBNAME: tipi
|
2022-07-06 09:15:35 +00:00
|
|
|
POSTGRES_HOST: tipi-db
|
2022-05-17 17:29:12 +00:00
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
|
|
|
|
|
|
|
dashboard:
|
|
|
|
build:
|
2022-06-03 20:42:23 +00:00
|
|
|
context: .
|
2022-05-17 17:29:12 +00:00
|
|
|
dockerfile: Dockerfile.dev
|
2022-06-22 19:28:48 +00:00
|
|
|
command: /bin/sh -c "cd /dashboard && npm run dev"
|
2022-05-17 17:29:12 +00:00
|
|
|
container_name: dashboard
|
|
|
|
ports:
|
|
|
|
- 3000:3000
|
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
|
|
|
environment:
|
|
|
|
- INTERNAL_IP=${INTERNAL_IP}
|
|
|
|
volumes:
|
2022-06-22 19:28:48 +00:00
|
|
|
- ${PWD}/packages/dashboard/src:/dashboard/src
|
|
|
|
# - /dashboard/node_modules
|
|
|
|
# - /dashboard/.next
|
2022-05-17 17:29:12 +00:00
|
|
|
labels:
|
|
|
|
traefik.enable: true
|
|
|
|
traefik.http.routers.dashboard.rule: PathPrefix("/") # Host(`tipi.local`) &&
|
|
|
|
traefik.http.routers.dashboard.entrypoints: webinsecure
|
|
|
|
traefik.http.routers.dashboard.service: dashboard
|
|
|
|
traefik.http.services.dashboard.loadbalancer.server.port: 3000
|
|
|
|
|
|
|
|
networks:
|
|
|
|
tipi_main_network:
|
|
|
|
driver: bridge
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
|
|
|
- subnet: 10.21.21.0/24
|