refactor(docker): rename postgres service to avoid DNS conflicts

- Rename service from 'postgres' to 'bttoxinpostgres'
- Rename container from 'bttoxin-postgres' to 'bttoxinpostgres'
- Update DATABASE_URL references to use new container name
- Prevents DNS collision with other projects on shared frontend network

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zly
2026-01-28 21:04:36 +08:00
parent 41a6fa976c
commit d66abf1596

View File

@@ -6,9 +6,9 @@
# 3. Fixes PYTHONPATH issues for Celery workers # 3. Fixes PYTHONPATH issues for Celery workers
services: services:
postgres: bttoxinpostgres:
image: docker.m.daocloud.io/library/postgres:15-alpine image: docker.m.daocloud.io/library/postgres:15-alpine
container_name: bttoxin-postgres container_name: bttoxinpostgres
restart: unless-stopped restart: unless-stopped
environment: environment:
# Unified credentials matching the original 'docker' project # Unified credentials matching the original 'docker' project
@@ -43,13 +43,13 @@ services:
- JOBS_DIR=/app/jobs - JOBS_DIR=/app/jobs
- UPLOAD_DIR=/app/jobs/uploads - UPLOAD_DIR=/app/jobs/uploads
- RESULTS_DIR=/app/jobs/results - RESULTS_DIR=/app/jobs/results
- DATABASE_URL=postgresql://bttoxin:bttoxin_password@bttoxin-postgres:5432/bttoxin_db - DATABASE_URL=postgresql://bttoxin:bttoxin_password@bttoxinpostgres:5432/bttoxin_db
- REDIS_URL=redis://bttoxin-redis:6379/0 - REDIS_URL=redis://bttoxin-redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0 - CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0 - CELERY_RESULT_BACKEND=redis://redis:6379/0
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
- postgres - bttoxinpostgres
- redis - redis
networks: networks:
- frontend - frontend
@@ -89,13 +89,13 @@ services:
- JOBS_DIR=/app/jobs - JOBS_DIR=/app/jobs
- UPLOAD_DIR=/app/jobs/uploads - UPLOAD_DIR=/app/jobs/uploads
- RESULTS_DIR=/app/jobs/results - RESULTS_DIR=/app/jobs/results
- DATABASE_URL=postgresql://bttoxin:bttoxin_password@bttoxin-postgres:5432/bttoxin_db - DATABASE_URL=postgresql://bttoxin:bttoxin_password@bttoxinpostgres:5432/bttoxin_db
- REDIS_URL=redis://bttoxin-redis:6379/0 - REDIS_URL=redis://bttoxin-redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0 - CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0 - CELERY_RESULT_BACKEND=redis://redis:6379/0
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
- postgres - bttoxinpostgres
- redis - redis
networks: networks:
- frontend - frontend