Files
petfeed/docker/docker-compose.yml
T
admin 6980b09e45 fix(deploy): resolve Sentry sourcemap upload release name via git SHA build arg
.git is excluded from the Docker build context (.dockerignore), so
@sentry/nextjs can't auto-detect a release via git and falls back to the
literal string "undefined" for --release, which made the sourcemaps
upload command fail with exit code 1 (confirmed via verbose build log).
start.sh now resolves the short SHA on the host and passes it through
as a SENTRY_RELEASE build arg, same pattern as the other Sentry vars.
2026-08-14 07:18:17 +02:00

54 lines
1.8 KiB
YAML

services:
redis:
image: redis:7-alpine
container_name: pawfeed-redis
restart: unless-stopped
volumes:
- redis_data:/data
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}
pawfeed:
build:
context: ..
dockerfile: docker/Dockerfile
args:
# Public vars needed at build time (baked into client bundle).
# Docker Compose reads these from docker/.env automatically.
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}
NEXT_PUBLIC_SUPABASE_URL: ${NEXT_PUBLIC_SUPABASE_URL}
NEXT_PUBLIC_SENTRY_DSN: ${NEXT_PUBLIC_SENTRY_DSN}
# Sentry/GlitchTip source-map upload also runs during `npm run build`
# (withSentryConfig in next.config.ts), so it needs these as build
# args too — env_file below only reaches the running container, not
# the build stage. Leave unset to keep sourcemap upload disabled.
SENTRY_ORG: ${SENTRY_ORG}
SENTRY_PROJECT: ${SENTRY_PROJECT}
SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN}
# Resolves the sourcemap upload's release name. .git is excluded from
# the build context (see .dockerignore), so @sentry/nextjs can't
# auto-detect it via git and falls back to a literal "undefined"
# string, which GlitchTip's sourcemaps upload rejects. start.sh sets
# this from `git rev-parse --short HEAD` on the host before building.
SENTRY_RELEASE: ${SENTRY_RELEASE}
image: pawfeed:latest
container_name: pawfeed
restart: unless-stopped
env_file:
- .env
environment:
NODE_ENV: production
REDIS_URL: redis://:${REDIS_PASSWORD}@redis:6379
depends_on:
- redis
networks:
- default
- nginx_default
volumes:
redis_data:
networks:
default:
nginx_default:
external: true