-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
141 lines (132 loc) · 5.64 KB
/
docker-compose.dev.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
version: "3"
services:
taxi-front:
container_name: taxi-front-dev
restart: always
image: ${FRONT_IMAGE:-666583083672.dkr.ecr.ap-northeast-2.amazonaws.com/taxi-front:dev}
networks:
- proxy
environment:
- REACT_APP_FRONT_URL=${FRONT_URL:-https://taxi.dev.sparcs.org}
- REACT_APP_BACK_URL=${BACK_URL:-https://taxi.dev.sparcs.org/api}
- REACT_APP_IO_URL=${IO_URL:-https://taxi.dev.sparcs.org}
- REACT_APP_OG_URL=${OG_URL:-https://og-image.taxi.dev.sparcs.org}
- REACT_APP_S3_URL=${S3_URL:-https://sparcs-taxi-dev.s3.ap-northeast-2.amazonaws.com}
- REACT_APP_CHANNELTALK_PLUGIN_KEY=${CHANNELTALK_PLUGIN_KEY}
- REACT_APP_KAKAO_SDK_KEY=${KAKAO_SDK_KEY}
- REACT_APP_GA_TRACKING_ID=${GA_TRACKING_ID}
- REACT_APP_FIREBASE_CONFIG=${FIREBASE_CONFIG}
labels:
- "com.centurylinklabs.watchtower.scope=taxi-dev"
- 'com.centurylinklabs.watchtower.lifecycle.pre-update=curl -X POST -H ''Content-type: application/json'' --data ''{"text":"업데이트를 위해 taxi-front-dev 서비스를 종료시켰습니다."}'' ${SLACK_WATCHTOWER_WEBHOOK}'
- 'com.centurylinklabs.watchtower.lifecycle.post-update=curl -X POST -H ''Content-type: application/json'' --data ''{"text":"업데이트 후 taxi-front-dev 서비스를 재시작하였습니다."}'' ${SLACK_WATCHTOWER_WEBHOOK}'
taxi-back:
container_name: taxi-back-dev
restart: always
image: ${BACK_IMAGE:-666583083672.dkr.ecr.ap-northeast-2.amazonaws.com/taxi-back:dev}
depends_on:
- taxi-mongo
- taxi-redis
networks:
- proxy
- backend
environment:
- SESSION_KEY=${SESSION_KEY:?err}
- SPARCSSSO_CLIENT_ID=${SPARCSSSO_CLIENT_ID}
- SPARCSSSO_CLIENT_KEY=${SPARCSSSO_CLIENT_KEY}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:?err}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:?err}
- AWS_S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME:-sparcs-taxi-dev}
- JWT_SECRET_KEY=${JWT_SECRET_KEY:?err}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}
- TEST_ACCOUNTS=${TEST_ACCOUNTS}
- SLACK_REPORT_WEBHOOK_URL=${SLACK_REPORT_WEBHOOK_URL}
- DB_PATH=mongodb://taxi-mongo:27017/taxi
- REDIS_PATH=redis://taxi-redis:6379
labels:
- "com.centurylinklabs.watchtower.scope=taxi-dev"
- 'com.centurylinklabs.watchtower.lifecycle.pre-update=curl -X POST -H ''Content-type: application/json'' --data ''{"text":"업데이트를 위해 taxi-back-dev 서비스를 종료시켰습니다."}'' ${SLACK_WATCHTOWER_WEBHOOK}'
- 'com.centurylinklabs.watchtower.lifecycle.post-update=curl -X POST -H ''Content-type: application/json'' --data ''{"text":"업데이트 후 taxi-back-dev 서비스를 재시작하였습니다."}'' ${SLACK_WATCHTOWER_WEBHOOK}'
volumes:
- taxi-back-dev-logs:/usr/src/app/logs:rw
command: npx cross-env TZ='Asia/Seoul' NODE_ENV=development node dist/index.js
taxi-og-generator:
container_name: taxi-og-generator-dev
restart: always
image: ${OG_IMAGE:-666583083672.dkr.ecr.ap-northeast-2.amazonaws.com/taxi-og-generator:dev}
ports:
- "${OG_PORT:?err}:80"
depends_on:
- taxi-back
networks:
- backend
environment:
- API_ROOM_INFO=http://taxi-back/rooms/publicInfo?id={}
- FRONT_URL=${FRONT_URL:-https://taxi.dev.sparcs.org}
labels:
- "com.centurylinklabs.watchtower.scope=taxi-dev"
- 'com.centurylinklabs.watchtower.lifecycle.pre-update=curl -X POST -H ''Content-type: application/json'' --data ''{"text":"업데이트를 위해 taxi-og-generator-dev 서비스를 종료시켰습니다."}'' ${SLACK_WATCHTOWER_WEBHOOK}'
- 'com.centurylinklabs.watchtower.lifecycle.post-update=curl -X POST -H ''Content-type: application/json'' --data ''{"text":"업데이트 후 taxi-og-generator-dev 서비스를 재시작하였습니다."}'' ${SLACK_WATCHTOWER_WEBHOOK}'
taxi-proxy:
container_name: taxi-proxy-dev
restart: always
image: nginx:1.24.0
ports:
- "${PROXY_PORT:?err}:80"
networks:
- proxy
depends_on:
- taxi-front
- taxi-back
volumes:
- ./taxi-proxy/conf.d:/etc/nginx/conf.d:ro
taxi-mongo:
container_name: taxi-mongo-dev
restart: always
image: mongo:4.4
networks:
- backend
volumes:
- ./taxi-mongo/mongodb.conf:/etc/mongodb.conf
- taxi-mongo-dev-data:/data/db:rw
taxi-redis:
container_name: taxi-redis-dev
restart: always
image: redis:7.0.4-alpine
networks:
- backend
volumes:
- taxi-redis-dev-data:/data:rw
taxi-watchtower:
container_name: taxi-watchtower-dev
image: containrrr/watchtower:latest
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./taxi-ecr-helper/config.json:/config.json
- taxi-ecr-helper-executable:/go/bin
environment:
- HOME=/
- TZ=Asia/Seoul
- PATH=$PATH:/go/bin
- AWS_REGION=ap-northeast-2
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:?err}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:?err}
command: --debug --interval 60 --cleanup --enable-lifecycle-hooks --scope taxi-dev
labels: ["com.centurylinklabs.watchtower.scope=taxi-dev"]
# --interval 60 : 이미지 업데이트를 60초 마다 하도록 지정
# --cleanup : 업데이트 후 오래된 이미지 제거
# --enable-lifecycle-hooks : 컨테이너 업데이트 시 스크립트 실행 활성화
# taxi-front taxi-back : 업데이트 할 container 지정
volumes:
taxi-back-dev-logs:
external: true
taxi-mongo-dev-data:
external: true
taxi-redis-dev-data:
external: true
taxi-ecr-helper-executable:
external: true
networks:
proxy:
backend: