DAS_2023_1/mashkova_margarita_lab_3/docker-compose.yml

58 lines
1.0 KiB
YAML
Raw Permalink Normal View History

2023-12-14 09:39:03 +04:00
version: '3'
networks:
my-network:
driver: bridge
services:
db-university:
image: postgres:latest
container_name: db-university
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: admin
POSTGRES_USER: admin
POSTGRES_DB: university
restart: always
networks:
- my-network
groupe-service:
build:
context: .
dockerfile: ./groupe-service/Dockerfile
container_name: groupe-service
ports:
- 8080:8080
restart: always
depends_on:
- db-university
networks:
- my-network
student-service:
build:
context: .
dockerfile: ./student-service/Dockerfile
container_name: student-service
ports:
- 8081:8081
restart: always
depends_on:
- db-university
networks:
- my-network
nginx:
image: nginx
container_name: nginx
ports:
- "80:80"
networks:
- my-network
volumes:
- ./nginx-conf:/etc/nginx/conf.d
depends_on:
- groupe-service
- student-service