-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
98 lines (93 loc) · 2.62 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
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
version: "2"
services:
app:
build: ./
command:
[
sh,
-c,
"cd /app/server && yarn run prod-start-server & cd /app/spa && yarn run prod-start-spa"
]
environment:
- DROPBOX_APP_KEY=${DROPBOX_APP_KEY}
- DROPBOX_APP_SECRET=${DROPBOX_APP_SECRET}
- JWT_COOKIE_SECRET=${JWT_COOKIE_SECRET}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_DATABASE_TESTING=${MYSQL_DATABASE_TESTING}
- MYSQL_PASSWORD=${MYSQL_PASSWORD_PRODUCTION}
- NODE_ENV=production
- LOG_LEVEL=warn
- IMAGGA_KEY=${IMAGGA_KEY}
- IMAGGA_SECRET=${IMAGGA_SECRET}
- API_LOCATION_IQ_KEY=${API_LOCATION_IQ_KEY}
- API_GOOGLE_ELEVATION_KEY=${API_GOOGLE_ELEVATION_KEY}
- API_OCR_SPACE_KEY=${API_OCR_SPACE_KEY}
- API_PLATE_RECOGNIZER=${API_PLATE_RECOGNIZER}
- API_PLANT_NET_KEY=${API_PLANT_NET_KEY}
- SEARCH_CONFIDENCE_THRESHOLD=${SEARCH_CONFIDENCE_THRESHOLD}
- SPA_EXTERNAL_PORT=443
- API_EXTERNAL_PORT=3501
- API_INTERNAL_PORT=4000
- API_HOST=${DOMAIN_API_PROD}
- SPA_HOST=${DOMAIN_SPA_PROD}
- REACT_APP_API_HOST=${DOMAIN_API_PROD}
- REACT_APP_API_PORT=443
- PROCESSING_DIR_IMAGE_SIZE_LIMIT_GB=${PROCESSING_DIR_IMAGE_SIZE_LIMIT_GB}
- PROCESSING_DIR_VIDEO_SIZE_LIMIT_GB=${PROCESSING_DIR_VIDEO_SIZE_LIMIT_GB}
volumes:
- ./app:/app
- /logs/picili-ts-server:/app/server/logs
ports:
- "4000:4000"
expose:
- "3000"
- "4000"
depends_on:
- mysql
# only in dev do we need phpmyadmin (so we can just bash into the server and stil use mysql/phpmyadmin)
- phpmyadmin
mem_limit: ${APP_MEM_LIMIT_PROD}
logging:
options:
max-size: 10m
mysql:
image: mysql:5.7
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD_PRODUCTION}
volumes:
- mysqldata:/var/lib/mysql
- ./mysql/mycustom.cnf:/etc/mysql/conf.d/custom.cnf
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
- PMA_HOST=mysql
- PMA_ARBITRARY=1
- MYSQL_PASSWORD=${MYSQL_PASSWORD_PRODUCTION}
- UPLOAD_LIMIT=2G
ports:
- "8083:80"
expose:
- "80"
volumes:
- /sessions
depends_on:
- mysql
nginx:
image: nginx:1.21
restart: unless-stopped
ports:
- "80:80"
- "443:443"
environment:
- DOMAIN_SPA=${DOMAIN_SPA_PROD}
- DOMAIN_API=${DOMAIN_API_PROD}
volumes:
- ./container-conf/nginx/templates:/etc/nginx/templates
depends_on:
- app
volumes:
mysqldata:
driver: "local"