Merge master into security/bind-ports-to-localhost: keep localhost port binding and redis healthcheck
This commit is contained in:
36
compose.yml
36
compose.yml
@@ -21,6 +21,11 @@ services:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "127.0.0.1:${REDIS_PORT:-6379}:6379"
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
build:
|
||||
@@ -29,7 +34,7 @@ services:
|
||||
context: .
|
||||
dockerfile: backend/Dockerfile
|
||||
env_file:
|
||||
- ./backend/.env.example
|
||||
- ./backend/.env
|
||||
environment:
|
||||
# Override localhost defaults for container networking
|
||||
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-mission_control}
|
||||
@@ -42,7 +47,7 @@ services:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "${BACKEND_PORT:-8000}:8000"
|
||||
|
||||
@@ -50,7 +55,7 @@ services:
|
||||
build:
|
||||
context: ./frontend
|
||||
args:
|
||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
|
||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-auto}
|
||||
NEXT_PUBLIC_AUTH_MODE: ${AUTH_MODE}
|
||||
# Optional, user-managed env file.
|
||||
# IMPORTANT: do NOT load `.env.example` here because it contains non-empty
|
||||
@@ -59,23 +64,40 @@ services:
|
||||
- path: ./frontend/.env
|
||||
required: false
|
||||
environment:
|
||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
|
||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-auto}
|
||||
NEXT_PUBLIC_AUTH_MODE: ${AUTH_MODE}
|
||||
depends_on:
|
||||
- backend
|
||||
ports:
|
||||
- "${FRONTEND_PORT:-3000}:3000"
|
||||
develop:
|
||||
watch:
|
||||
# Rebuild frontend image when UI source or build config changes.
|
||||
- action: rebuild
|
||||
path: ./frontend/src
|
||||
- action: rebuild
|
||||
path: ./frontend/package.json
|
||||
- action: rebuild
|
||||
path: ./frontend/package-lock.json
|
||||
- action: rebuild
|
||||
path: ./frontend/next.config.ts
|
||||
- action: rebuild
|
||||
path: ./frontend/postcss.config.js
|
||||
- action: rebuild
|
||||
path: ./frontend/tailwind.config.cjs
|
||||
- action: rebuild
|
||||
path: ./frontend/tsconfig.json
|
||||
|
||||
webhook-worker:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: backend/Dockerfile
|
||||
command: ["rq", "worker", "-u", "redis://redis:6379/0"]
|
||||
command: ["python", "scripts/rq-docker", "worker"]
|
||||
env_file:
|
||||
- ./backend/.env.example
|
||||
- ./backend/.env
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_started
|
||||
condition: service_healthy
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user