43 lines
754 B
YAML
43 lines
754 B
YAML
version: '3'
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:latest
|
|
ports:
|
|
- 80:80
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
|
restart: always
|
|
depends_on:
|
|
- product-service
|
|
- order-service
|
|
networks:
|
|
- mynetwork
|
|
|
|
db:
|
|
image: postgres:latest
|
|
ports:
|
|
- 5432:5432
|
|
environment:
|
|
POSTGRES_PASSWORD: admin
|
|
POSTGRES_USER: admin
|
|
POSTGRES_DB: message-api
|
|
volumes:
|
|
- ./database.sql:/docker-entrypoint-initdb.d/database.sql
|
|
restart: always
|
|
networks:
|
|
- mynetwork
|
|
|
|
user_app:
|
|
build:
|
|
context: /user_app
|
|
dockerfile: Dockerfile
|
|
|
|
message_app:
|
|
build:
|
|
context: /message_app
|
|
dockerfile: Dockerfile
|
|
|
|
networks:
|
|
mynetwork:
|
|
driver: bridge |