Compare commits

...

3 Commits

Author SHA1 Message Date
274fcf9a5c Add persisted db volume 2025-05-20 10:14:54 -04:00
aa70f99727 Fix traefik routing with explicit network 2025-05-20 10:08:26 -04:00
43f165c782 Fix traefik routing with multiple networks 2025-05-20 09:00:39 -04:00
2 changed files with 34 additions and 17 deletions

View File

@ -1,5 +1,6 @@
name: sentry ---
services: name: sentry
services:
scraper: scraper:
build: build:
context: . context: .
@ -8,9 +9,10 @@
volumes: volumes:
- ./:/app - ./:/app
- node_modules:/app/node_modules - node_modules:/app/node_modules
command: node ace serve --watch command: /bin/bash -c "echo 'hello' && node ace migration:run --force && node ace serve --watch"
depends_on: depends_on:
db: db:
condition: service_healthy condition: service_healthy
volumes: volumes:
node_modules: {} node_modules: {}

View File

@ -13,7 +13,12 @@ services:
- traefik - traefik
scraper: scraper:
labels: labels:
- "traefik.enable=true"
- "traefik.docker.network=sentry_traefik"
- "traefik.http.routers.scraper.rule=Host(`sentry.docker.localhost`)" - "traefik.http.routers.scraper.rule=Host(`sentry.docker.localhost`)"
- "traefik.http.services.scraper.loadbalancer.server.port=3333"
- "traefik.http.routers.scraper.entrypoints=http"
- "traefik.http.routers.scraper.service=scraper"
networks: networks:
- traefik - traefik
- redis - redis
@ -30,10 +35,18 @@ services:
start_period: 5s start_period: 5s
networks: networks:
- database - database
volumes:
- pg_data:/var/lib/postgresql/data
grafana: grafana:
image: grafana/grafana:latest image: grafana/grafana:latest
labels: labels:
- "traefik.enable=true"
- "traefik.docker.network=sentry_traefik"
- "traefik.http.routers.grafana.rule=Host(`grafana.docker.localhost`)" - "traefik.http.routers.grafana.rule=Host(`grafana.docker.localhost`)"
- "traefik.http.routers.grafana.entrypoints=http"
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
- "traefik.http.routers.grafana.service=grafana"
networks: networks:
- traefik - traefik
- database - database
@ -48,3 +61,5 @@ networks:
driver: bridge driver: bridge
redis: redis:
driver: bridge driver: bridge
volumes:
pg_data: {}