58 lines
1.0 KiB
YAML
58 lines
1.0 KiB
YAML
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 |