runtipi/docker-compose.dev.yml

78 lines
2 KiB
YAML
Raw Normal View History

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
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
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USERNAME}
POSTGRES_DB: ${POSTGRES_DBNAME}
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-06-22 19:28:48 +00:00
command: /bin/sh -c "cd /api && npm run dev"
depends_on:
2022-06-20 19:04:42 +00:00
- tipi-db
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:
INTERNAL_IP: ${INTERNAL_IP}
TIPI_VERSION: ${TIPI_VERSION}
JWT_SECRET: ${JWT_SECRET}
ROOT_FOLDER_HOST: ${ROOT_FOLDER_HOST}
NGINX_PORT: ${NGINX_PORT}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USERNAME}
POSTGRES_DB: ${POSTGRES_DBNAME}
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