26a73d1d3b
Co-authored-by: Copilot <copilot@github.com>
35 lines
864 B
YAML
35 lines
864 B
YAML
version: "3.8"
|
|
|
|
# Local test compose overlay — adds a Postgres service so you can run the
|
|
# full stack locally without an external DB. Use it together with
|
|
# docker-compose.prod.yml:
|
|
#
|
|
# docker compose -f rad/docker/docker-compose.prod.yml -f rad/docker/docker-compose.test.yml up -d --build
|
|
|
|
services:
|
|
db:
|
|
image: postgres:14-alpine
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-django}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
|
POSTGRES_DB: ${POSTGRES_DB:-rad}
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_test_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL","pg_isready -U ${POSTGRES_USER:-django}" ]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
networks:
|
|
- test_net
|
|
|
|
networks:
|
|
test_net:
|
|
name: rad_test_net
|
|
|
|
volumes:
|
|
postgres_test_data:
|