Add dev overrides via compose

This commit is contained in:
Mike Conrad
2025-05-19 12:09:05 -04:00
parent a96b9f2c8b
commit 7fa503897c
3 changed files with 26 additions and 18 deletions

View File

@ -5,12 +5,13 @@ FROM node:20.12.2-alpine3.18 AS base
FROM base AS deps
WORKDIR /app
ADD package.json package-lock.json ./
RUN npm ci
FROM base AS dev-deps
FROM node:22 AS dev-deps
WORKDIR /app
ADD package.json package-lock.json ./
ENV NODE_ENV=development
RUN npm ci
EXPOSE 3333
# Production only deps stage
FROM base AS production-deps

View File

@ -0,0 +1,16 @@
name: sentry
services:
scraper:
build:
context: .
target: dev-deps
env_file: .env.develop
volumes:
- ./:/app
- node_modules:/app/node_modules
command: node ace serve --watch
depends_on:
db:
condition: service_healthy
volumes:
node_modules: {}

View File

@ -7,27 +7,20 @@
- 80:80
- 8080:8080
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
scraper:
# image: paragontruss.azurecr.io/sentry-scraper
build:
context: .
target: dev-deps
ports:
- 3333:3333
env_file: .env
volumes:
- backend_node_modules:/app/node_modules
- ./:/app
command: node ace serve --watch
labels:
- "traefik.http.routers.backend.rule=Host(`sentry.docker.localhost`)"
- "traefik.http.routers.scraper.rule=Host(`sentry.docker.localhost`)"
db:
image: postgres:16
environment:
- POSTGRES_PASSWORD=password
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "postgres"]
interval: 5s
timeout: 60s
retries: 5
start_period: 5s
grafana:
image: grafana/grafana:latest
labels:
@ -35,5 +28,3 @@
redis:
image: redis:latest
volumes:
backend_node_modules: {}