-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
97 lines (94 loc) · 3.42 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: "3"
services:
mongo:
image: mongo
restart: unless-stopped
volumes:
- ./${DATA_DIR:-data}/mongodb:/data/db
backend:
build: ./${BACKEND_SRC_DIR:-backend}/
image: ${BACKEND_IMAGE:-backend}:${IMAGE_TAG:-latest}
entrypoint: ["/bin/sh", "./entrypoint.sh"]
command: ["npm", "run", "${BACKEND_NPM_SCRIPT:-start}"]
restart: unless-stopped
volumes:
- ./${BACKEND_SRC_DIR:-backend}:/src/parse-server
- ./${DATA_DIR:-data}/parse-server/logs:/src/parse-server-logs
- /src/parse-server/node_modules/
environment:
- NODE_ENV=${NODE_ENV:-development}
- HOST_NAME=${HOST_NAME:-localhost}
- BACKEND_HOST_NAME
- BACKEND_PORT
- PARSE_SERVER_APPLICATION_ID=${APP_ID:-myappid}
- PARSE_SERVER_MASTER_KEY=${MASTER_KEY:-mymasterkey}
- PARSE_SERVER_APP_NAME=${APP_NAME:-myappname}
- PARSE_SERVER_MOUNT_PATH=${PARSE_SERVER_PATH:-/api}
- PARSE_SERVER_DATABASE_URI=${PARSE_SERVER_DATABASE_URI:-mongodb://mongo:27017/dev}
- PARSE_SERVER_GRAPHQL_PATH=${PARSE_SERVER_GRAPHQL_PATH:-/graphql}
- PARSE_SERVER_CLOUD=/src/parse-server/cloud/main.js
- PARSE_SERVER_LOGS_FOLDER=/src/parse-server-logs
- MAIL_SMTP_HOST=${MAIL_SMTP_HOST:-smtp.sendgrid.net}
- MAIL_SMTP_PORT=${MAIL_SMTP_PORT:-587}
- MAIL_SMTP_USERNAME=${MAIL_SMTP_USERNAME:-}
- MAIL_SMTP_PASSWORD=${MAIL_SMTP_PASSWORD:-}
- MAIL_FROM_ADDRESS=${MAIL_FROM_ADDRESS:[email protected]}
- PARSE_DASHBOARD_ENABLED=${PARSE_DASHBOARD_ENABLED:-yes}
- PARSE_DASHBOARD_USER_ID=${PARSE_DASHBOARD_USER_ID:-}
- PARSE_DASHBOARD_USER_PASSWORD=${PARSE_DASHBOARD_USER_PASSWORD:-}
- CMS_ENABLED=${CMS_ENABLED:-no}
- CMS_USER_EMAIL=${CMS_USER_EMAIL:-}
- CMS_USER_PASSWORD=${CMS_USER_PASSWORD:-}
depends_on:
- mongo
frontend:
build: ./${FRONTEND_SRC_DIR:-frontend}/
image: ${FRONTEND_IMAGE:-frontend}:${IMAGE_TAG:-latest}
command: ["npm", "run", "${FRONTEND_NPM_SCRIPT:-start}"]
expose:
- "${FRONTEND_DEV_SERVER_PORT:-1234}"
- "${HMR_PORT:-1235}"
environment:
- NODE_ENV=${NODE_ENV:-development}
- FRONTEND_DIST_DIR=${FRONTEND_DIST_DIR:-dist}
- HMR_PORT=${HMR_PORT:-1235}
- CHOKIDAR_USEPOLLING=1
volumes:
- ./${FRONTEND_SRC_DIR:-frontend}:/frontend
- /frontend/node_modules/
- /frontend/.cache/
caddy:
image: caddy:2-alpine
entrypoint: ["/bin/sh", "./entrypoint.sh"]
command:
[
"caddy",
"run",
"--config",
"/etc/caddy/Caddyfile",
"--adapter",
"caddyfile",
]
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "${BACKEND_PORT:-1337}:${BACKEND_PORT:-1337}"
- "${FRONTEND_DEV_SERVER_PORT:-1234}:${FRONTEND_DEV_SERVER_PORT:-1234}"
- "${HMR_PORT:-1235}:${HMR_PORT:-1235}"
environment:
- HOST_NAME=${HOST_NAME:-localhost}
- BACKEND_HOST_NAME
- BACKEND_PORT
- FRONTEND_DIST_DIR=${FRONTEND_DIST_DIR:-dist}
- FRONTEND_DEV_SERVER_PORT=${FRONTEND_DEV_SERVER_PORT:-1234}
- HMR_PORT=${HMR_PORT:-1235}
volumes:
- ./backend/entrypoint.sh:/srv/entrypoint.sh
- ./Caddyfile:/etc/caddy/Caddyfile
- ./${DATA_DIR:-data}/caddy/data:/data
- ./${DATA_DIR:-data}/caddy/config:/config
- ./${FRONTEND_SRC_DIR:-frontend}/${FRONTEND_DIST_DIR:-dist}:/srv/${FRONTEND_DIST_DIR:-dist}
depends_on:
- backend
- frontend