generated from bisco/codex-bootstrap
chore: rename postgres service to db
This commit is contained in:
+7
-3
@@ -1,5 +1,5 @@
|
||||
services:
|
||||
postgres:
|
||||
db:
|
||||
image: postgres:16.9-alpine
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
@@ -9,6 +9,10 @@ services:
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-replace-with-a-local-password}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- postgres
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
||||
interval: 5s
|
||||
@@ -24,7 +28,7 @@ services:
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
environment:
|
||||
DATABASE_URL: ${DATABASE_URL:-postgresql://theatre_lab:replace-with-a-local-password@postgres:5432/theatre_lab}
|
||||
DATABASE_URL: ${DATABASE_URL:-postgresql://theatre_lab:replace-with-a-local-password@db:5432/theatre_lab}
|
||||
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY:-replace-with-a-long-random-development-key}
|
||||
DJANGO_DEBUG: ${DJANGO_DEBUG:-true}
|
||||
DJANGO_ALLOWED_HOSTS: ${DJANGO_ALLOWED_HOSTS:-localhost,127.0.0.1,backend,azionelab.org}
|
||||
@@ -34,7 +38,7 @@ services:
|
||||
ports:
|
||||
- "127.0.0.1:8000:8000"
|
||||
depends_on:
|
||||
postgres:
|
||||
db:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health/', timeout=2)"]
|
||||
|
||||
Reference in New Issue
Block a user