35 lines
785 B
YAML
35 lines
785 B
YAML
services:
|
|
postgres:
|
|
image: postgres
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=Password123
|
|
- POSTGRES_DB=request_mirror_db
|
|
volumes:
|
|
- db-data:/var/lib/postgresql/data
|
|
networks:
|
|
- app-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d request_mirror_db | grep 'accepting connections'"]
|
|
request-mirror:
|
|
image: raspberrypi99/request-mirror:latest
|
|
ports:
|
|
- 80:80
|
|
environment:
|
|
- DATABASE_URL=postgres://postgres:Password123@postgres/request_mirror_db
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- app-network
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.16.0.0/24
|
|
|
|
volumes:
|
|
db-data:
|