-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
99 lines (94 loc) · 2.39 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
98
99
version: '3.8'
services:
app:
image: 'ammezie/postie:latest'
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
environment:
TZ: ${TZ}
PORT: ${PORT}
HOST: ${HOST}
LOG_LEVEL: ${LOG_LEVEL}
APP_KEY: ${APP_KEY}
NODE_ENV: ${NODE_ENV}
SESSION_DRIVER: ${SESSION_DRIVER}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_DATABASE: ${DB_DATABASE}
QUEUE_REDIS_HOST: ${REDIS_HOST}
QUEUE_REDIS_PORT: ${REDIS_PORT}
QUEUE_REDIS_PASSWORD: ${REDIS_PASSWORD}
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_USERNAME: ${SMTP_USERNAME}
SMTP_PASSWORD: ${SMTP_PASSWORD}
ports:
- '${PORT:-3333}:3333'
entrypoint: sh -c "node ace migration:run --force && node bin/server.js"
worker:
image: 'ammezie/postie:latest'
depends_on:
- app
environment:
TZ: ${TZ}
PORT: ${WORKER_PORT}
HOST: ${HOST}
LOG_LEVEL: ${LOG_LEVEL}
APP_KEY: ${APP_KEY}
NODE_ENV: ${NODE_ENV}
SESSION_DRIVER: ${SESSION_DRIVER}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_DATABASE: ${DB_DATABASE}
QUEUE_REDIS_HOST: ${REDIS_HOST}
QUEUE_REDIS_PORT: ${REDIS_PORT}
QUEUE_REDIS_PASSWORD: ${REDIS_PASSWORD}
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_USERNAME: ${SMTP_USERNAME}
SMTP_PASSWORD: ${SMTP_PASSWORD}
ports:
- '${WORKER_PORT:-4444}:4444'
command: ['node', '/home/node/app/ace', 'queue:listen']
mysql:
image: mysql:8.0
cap_add:
- SYS_NICE
restart: always
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
ports:
- '3306:3306'
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 5s
timeout: 2s
retries: 10
volumes:
- mysql-data:/var/lib/mysql
redis:
image: redis:latest
restart: always
ports:
- '6379:6379'
volumes:
- redis-data:/data
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
command: redis-server --save 20 1 --loglevel warning
healthcheck:
test: redis-cli ping
interval: 5s
retries: 10
timeout: 2s
volumes:
mysql-data:
redis-data: