54 lines
931 B
YAML
54 lines
931 B
YAML
|
services:
|
||
|
bd1:
|
||
|
build:
|
||
|
context: /bd1
|
||
|
dockerfile: Dockerfile
|
||
|
environment:
|
||
|
POSTGRES_DB: "service1"
|
||
|
POSTGRES_USER: "postgres"
|
||
|
POSTGRES_PASSWORD: "159753"
|
||
|
networks:
|
||
|
- network
|
||
|
bd2:
|
||
|
build:
|
||
|
context: /bd2
|
||
|
dockerfile: Dockerfile
|
||
|
environment:
|
||
|
POSTGRES_DB: "service2"
|
||
|
POSTGRES_USER: "postgres"
|
||
|
POSTGRES_PASSWORD: "159753"
|
||
|
networks:
|
||
|
- network
|
||
|
service1:
|
||
|
build:
|
||
|
context: /service1
|
||
|
dockerfile: Dockerfile
|
||
|
networks:
|
||
|
- network
|
||
|
depends_on:
|
||
|
- bd1
|
||
|
service2:
|
||
|
build:
|
||
|
context: /service2
|
||
|
dockerfile: Dockerfile
|
||
|
networks:
|
||
|
- network
|
||
|
depends_on:
|
||
|
- bd2
|
||
|
nginx:
|
||
|
image: nginx
|
||
|
ports:
|
||
|
- "80:80"
|
||
|
networks:
|
||
|
- network
|
||
|
volumes:
|
||
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
||
|
depends_on:
|
||
|
- service1
|
||
|
- service2
|
||
|
|
||
|
networks:
|
||
|
network:
|
||
|
driver: bridge
|
||
|
|