-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.local-microservices.yml
46 lines (46 loc) · 1.56 KB
/
docker-compose.local-microservices.yml
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
version: "3.8"
services:
nestjs-orders-app:
image: nestjs-orders-app
build:
# Conext set relative to nestjs-orders-app Dockerfile
context: nestjs-orders-app
dockerfile: ./deployment/Dockerfile
args:
SAMPLE_AUTH_TOKEN: token-token
# Example env variable definition for nestjs-orders-app used at run time
environment:
- SAMPLE_ENV=env-variable-string-value
# Allow attempting restart will ensure api will keep trying until becomes available
# https://stackoverflow.com/a/61523995/10779988
restart: on-failure
# Allows communicating with other services running on localhost e.g. mongodb, rabbitmq
# Incompatible with 'ports' setting. nestjs-orders-app will use port defined in main.ts
network_mode: host
# Volumes persist data generated by and used by Docker containers
# Mounts volume 'nestjs-orders-app' into /home/node/app in container
# 'app' was created as WORKDIR in the image Dockerfile
volumes:
- ./nestjs-orders-app:/home/node/app
operations-portal:
image: operations-portal
build:
context: operations-portal
dockerfile: ./deployment/Dockerfile
network_mode: host
volumes:
- ./operations-portal:/home/node/app
payment-app:
image: payment-app
build:
context: payment-app
dockerfile: ./deployment/Dockerfile
restart: on-failure
network_mode: host
volumes:
- ./payment-app:/home/node/app
# Ex of getting pre-built image from Dockerhub
# redis:
# image: redis:3.0-alpine
# ports:
# - "6379:6379"