-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
62 lines (58 loc) · 1.38 KB
/
docker-compose.prod.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
version: "3.8"
services:
############################
# Setup client container #
############################
client:
build:
context: ./client
dockerfile: Dockerfile.prod
args:
- REACT_APP_API_URL=${API_URL}
- DISABLE_ESLINT_PLUGIN=${DISABLE_ESLINT_PLUGIN}
ports:
- "1337:80"
depends_on:
- api
#########################
# Setup api container #
#########################
api:
build:
context: ./api
dockerfile: Dockerfile.prod
environment:
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_HOST_IP=mysql
- PORT=${API_PORT}
- S3_REGION=${S3_REGION}
- ACCESS_KEY_ID=${ACCESS_KEY_ID}
- SECRET_ACCESS_KEY=${SECRET_ACCESS_KEY}
- BUCKET=${BUCKET}
expose:
- ${API_PORT}
ports:
- ${API_PORT}:${API_PORT}
restart: always
depends_on:
- mysql
links:
- mysql
########################
# Setup db container #
########################
mysql:
image: mysql:8.0.20
environment:
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_HOST=${MYSQL_HOST}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
cap_add:
- SYS_NICE
ports:
- 3306:3306
restart: unless-stopped