-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose-dev.yaml
62 lines (58 loc) · 1.77 KB
/
compose-dev.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
53
54
55
56
57
58
59
60
61
62
# Visit the Docker compose reference guide for more information
# https://docs.docker.com/compose/compose-file/
# develop micro services
version: '0.2'
services:
# create producer service
producer:
# set image name and tag
image: producer:development
# configure build properties
build:
# set build context to producer devcontainer
context: ./.devcontainer/producer
# limit build to development stage
target: development
# bind host to container to persist file changes
volumes:
- .:/workspace: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
# overrides default command so things don't shut down after the process ends.
command: /bin/sh -c "while sleep 1000; do :; done"
# create consumer service
consumer:
# set image name and tag:
image: consumer:development
# configure build properties
build:
# set build context to consumer devcontainer
context: ./.devcontainer/consumer
# limit build to development stage
target: development
# bind host to container to persist file changes
volumes:
- .:/workspace:cached
# 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
# overrides default command so things don't shut down after the process ends.
command: /bin/sh -c "while sleep 1000; do :; done"
# create network
networks:
# name network
PingPong:
# configure network type
driver: bridge