This repository has been archived by the owner on Mar 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
158 lines (145 loc) · 3.6 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
version: '3'
services:
app:
build:
context: .
dockerfile: ./docker/app.dockerfile
args:
FPMPORT: 9000
image: hellechat/php
ports:
- "9000"
restart: unless-stopped
tty: true
working_dir: /var/www
volumes:
- ./:/var/www:delegated
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- app-network
depends_on:
- mysql
qworker:
build:
context: .
dockerfile: ./docker/qworker.dockerfile
restart: unless-stopped
tty: true
working_dir: /etc/supervisor/conf.d
depends_on:
- mysql
- redis
volumes:
- ./:/var/www:delegated
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
- ./docker/qworker/horizon.conf:/etc/supervisord.conf
networks:
- app-network
command:
["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
cron:
build:
context: .
dockerfile: ./docker/cron.dockerfile
restart: unless-stopped
tty: true
working_dir: /var/www
depends_on:
- mysql
- redis
volumes:
- ./:/var/www:delegated
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- app-network
command:
["sh", "/run.sh"]
nginx:
image: nginx:alpine
container_name: nginx
depends_on:
- app
- gotify
restart: unless-stopped
tty: true
environment:
GOTIFY_APP_PORT: '${GOTIFY_APP_PORT}'
APP_DOMAIN: '${APP_DOMAIN}'
ports:
- "80:80"
- "443:443"
volumes:
- ./:/var/www
- ./docker/nginx/conf.d/default.template:/etc/nginx/conf.d/default.template
- ./certbot/www:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
- ./docker/nginx/entrypoint.sh:/entrypoint.sh
networks:
- app-network
entrypoint: ["/entrypoint.sh"]
command: ["nginx", "-g", "daemon off;"]
gotify:
image: gotify/server
depends_on:
- mysql
expose:
- ${GOTIFY_APP_PORT}
- ${GOTIFY_APP_PORT_SSL}
volumes:
- 'godata:/app/data'
- ./docker/gotify/config.yml:/etc/gotify/config.yml
restart: unless-stopped
networks:
- app-network
environment:
GOTIFY_SERVER_PORT: '${GOTIFY_APP_PORT}'
GOTIFY_SERVER_SSL_PORT: '${GOTIFY_APP_PORT_SSL}'
GOTIFY_DEFAULTUSER_NAME: ${GOTIFY_USERNAME}
GOTIFY_DEFAULTUSER_PASS: ${GOTIFY_PASSWORD}
GOTIFY_DATABASE_DIALECT: 'mysql'
GOTIFY_DATABASE_CONNECTION: '${DB_USERNAME}:${DB_PASSWORD}@tcp(mysql:3306)/gotify?charset=utf8&parseTime=True&loc=Local'
mysql:
image: 'mysql:8.0'
container_name: mysql
restart: unless-stopped
tty: true
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- 'dbdata:/var/lib/mysql'
networks:
- app-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"]
retries: 3
timeout: 5s
redis:
image: redis:6.2
container_name: redis
restart: unless-stopped
ports:
- "6379:6379"
networks:
- app-network
# mailhog:
# container_name: mailhog
# image: 'mailhog/mailhog:latest'
# ports:
# - '${FORWARD_MAILHOG_PORT:-1025}:1025'
# - '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025'
# networks:
# - app-network
networks:
app-network:
driver: bridge
volumes:
godata:
driver: local
dbdata:
driver: local