forked from ptrumpis/snap-camera-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
77 lines (72 loc) · 2.33 KB
/
docker-compose.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
version: '3.8'
services:
mysql:
image: mysql:8.0
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
ports:
- ${MYSQL_LOCAL_PORT}:${MYSQL_DOCKER_PORT}
volumes:
- db:/var/lib/mysql
- ./mysql:/docker-entrypoint-initdb.d:ro
adminer:
image: adminer
environment:
- ADMINER_DEFAULT_SERVER=mysql
- ADMINER_DESIGN=${ADMINER_DESIGN}
ports:
- ${ADMINER_LOCAL_PORT}:${ADMINER_DOCKER_PORT}
depends_on:
- mysql
webproxy:
image: nginx
environment:
- WEBAPP_PORT=${APP_DOCKER_PORT}
- HTTP_PORT=${NGINX_DOCKER_PORT}
- WWW_ROOT=${NGINX_WWW_ROOT}
volumes:
- ./ssl/studio-app.snapchat.com.crt:/etc/ssl/certs/studio-app.snapchat.com.crt:ro
- ./ssl/studio-app.snapchat.com.key:/etc/ssl/private/studio-app.snapchat.com.key:ro
- ./nginx/default.conf.template:/etc/nginx/templates/default.conf.template:ro
- ./nginx/theme:/etc/nginx/theme:ro
- ./nginx/snap-camera-categories-media:${NGINX_WWW_ROOT}/snap-camera-categories-media:ro
- ./nginx/snap-camera-media:${NGINX_WWW_ROOT}/snap-camera-media:ro
- ./nginx/snap-camera-media-alt:${NGINX_WWW_ROOT}/snap-camera-media-alt:ro
- ./import:${NGINX_WWW_ROOT}/import
- storage:${NGINX_WWW_ROOT}
ports:
- ${NGINX_LOCAL_PORT}:${NGINX_DOCKER_PORT}
- 443:443
depends_on:
- webapp
webapp:
build: .
environment:
- DB_HOST=mysql
- DB_USER=${MYSQL_USER}
- DB_PASS=${MYSQL_ROOT_PASSWORD}
- DB_NAME=${MYSQL_DATABASE}
- DB_PORT=${MYSQL_DOCKER_PORT}
- PORT=${APP_DOCKER_PORT}
- STORAGE_SERVER=http://studio-app.snapchat.com:${NGINX_LOCAL_PORT}
- STORAGE_PATH=/var/lib/snapcamera
- IMPORT_DIR=import
- MEDIA_DIR=snap-camera-media
- MEDIA_DIR_ALT=snap-camera-media-alt
volumes:
# content of snap-camera-media (MEDIA_DIR) is not getting included automatically through storage
- ./nginx/snap-camera-media:/var/lib/snapcamera/snap-camera-media:ro
- ./import:/var/lib/snapcamera/import
- ./:/usr/src/app
- /usr/src/app/node_modules
- storage:/var/lib/snapcamera
ports:
- ${APP_LOCAL_PORT}:${APP_DOCKER_PORT}
depends_on:
- mysql
volumes:
storage:
name: server-storage
db:
name: mysql-db