-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
66 lines (63 loc) · 1.45 KB
/
docker-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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: '3.7'
services:
# frontend:
# build:
# context: client/
# target: release
# depends_on:
# - frontend-sidecar-env-gen
# ports:
# - 8081:8080
# env_file:
# - .env
# volumes:
# - env-js:/opt/app/config:ro
# image: todo/go-to-do-frontend:rc
# # in k8s, it will be easier using sidecar with emptyDir vol
# frontend-sidecar-env-gen:
# image: todo/dotenv-to-js-object:4ea
# working_dir: /data
# volumes:
# - env-js:/data
# healthcheck:
# # healthy when env.js file is not empty
# test: ["CMD", "test", "-s", "/data/env.js"]
# timeout: 1s
# start_period: 1s
# interval: 10s
# retries: 3
# env_file:
# - .env
# command: ->
# --env-vars-filter=REACT_APP_
# --run-as=daemon
# --refresh-period=50
api:
build:
context: server/
target: release
depends_on:
- db
ports:
- 8080:8080
environment:
DB_CONNECTION: mongodb://${DB_USER}:${DB_PASS}@${DB_HOST}:27017/${DB_NAME}
DB_NAME: ${DB_NAME}
image: todo/go-to-do-api:rc
db:
networks:
- todo
image: bitnami/mongodb:${DB_IMAGE_TAG}
# volumes:
# - db-data:/bitnami/mongodb
environment:
MONGODB_ROOT_PASSWORD: ${DB_ROOT_PASS}
MONGODB_DATABASE: ${DB_NAME}
MONGODB_USERNAME: ${DB_USER}
MONGODB_PASSWORD: ${DB_PASS}
networks:
todo:
driver: bridge
# volumes:
# db-data:
# env-js: