-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
41 lines (41 loc) · 1.17 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
version: "2.1"
services:
mysql:
command: "mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci"
image: "mysql/mysql-server:5.7"
volumes:
- "./data/mysql/${NODE_ENV}:/var/lib/mysql"
restart: always
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: "${MYSQL_DATABASE}"
MYSQL_USER: "${MYSQL_USER}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
redis:
image: "redis:3.0"
volumes:
- "./data/redis/${NODE_ENV}:/data"
restart: always
command: redis-server --maxmemory 5gb
sysctls:
net.core.somaxconn: 512
node:
image: "<Your Registry>"
command: "nodemon ."
ports:
- "${NODE_PORT}:80"
environment:
NODE_ENV: "${NODE_ENV}"
NODE_PORT: "${NODE_PORT}"
BASE_URL: "${BASE_URL}"
SESSION_SECRET: "${SESSION_SECRET}"
ROOT_ACCOUNT_EMAIL: "${ROOT_ACCOUNT_EMAIL}"
ROOT_ACCOUNT_PASSWORD: "${ROOT_ACCOUNT_PASSWORD}"
MYSQL_DATABASE: "${MYSQL_DATABASE}"
MYSQL_USER: "${MYSQL_USER}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
MYSQL_HOST: "${MYSQL_HOST}"
REDIS_HOST: "${REDIS_HOST}"
depends_on:
- mysql
- redis