DAS_2023_1/arutunyan_dmitry_lab_3/docker-compose.yaml

58 lines
1.0 KiB
YAML

version: '3'
networks:
mynetwork:
driver: bridge
services:
db-market-api:
image: postgres:latest
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: admin
POSTGRES_USER: admin
POSTGRES_DB: market-api
volumes:
- ./database.sql:/docker-entrypoint-initdb.d/database.sql
restart: always
networks:
- mynetwork
product-service:
build:
context: .
dockerfile: ./product-service/Dockerfile
ports:
- 8080:8080
restart: always
depends_on:
- db-market-api
networks:
- mynetwork
order-service:
build:
context: .
dockerfile: ./order-service/Dockerfile
ports:
- 8081:8081
restart: always
depends_on:
- db-market-api
networks:
- mynetwork
nginx:
image: nginx:latest
ports:
- 80:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
restart: always
depends_on:
- product-service
- order-service
networks:
- mynetwork