1
0
Fork 0
This repository has been archived on 2025-01-15. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
devops-with-docker/Part2/Exercise09/docker-compose.yml
2023-03-15 18:22:26 +02:00

38 lines
687 B
YAML

version: '3.9'
services:
db:
image: postgres:15.2-alpine
environment:
- POSTGRES_PASSWORD=postgres
container_name: db
volumes:
- ./data:/var/lib/postgresql/data
backend:
image: example-backend:2.9
environment:
- REDIS_HOST=cache
- POSTGRES_HOST=db
- POSTGRES_PASSWORD=postgres
container_name: back
depends_on:
- db
frontend:
image: example-frontend:2.9
container_name: front
redis:
image: redis:7.0.9
container_name: cache
proxy:
image: nginx:1.23.3
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- 80:80
depends_on:
- backend
- frontend