-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
52 lines (48 loc) · 1.35 KB
/
compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Visit the Docker compose reference guide for more information
# https://docs.docker.com/compose/compose-file/
# deploy micro services
version: '0.2'
services:
# create producer container
producer:
# set image name and tag
image: producer:production
# configure build properties
build:
# set build context to producer devcontainer
context: ./.devcontainer/producer
# bind host to container to persist file changes
volumes:
- ./producer:/microservices-producer:cached
# add service dependencies
depends_on:
- consumer
# add service to network
networks:
- PingPong
# enable allocation of pseudo-TTY to keep service running
tty: true
# keep standard input open on container
stdin_open: true
# create consumer container
consumer:
# set image name and tag
image: consumer:production
# configure build properties
build:
# set build context to consumer devcontainer
context: ./.devcontainer/consumer
# bind host to container to persist file changes
volumes:
- ./consumer:/microservices-consumer:cached
# add service to network
networks:
- PingPong
# enable allocation of pseudo-TTY to keep service running
tty: true
# create network
networks:
# name network
PingPong:
# configure network type
driver: bridge