-
-
Notifications
You must be signed in to change notification settings - Fork 159
/
docker-compose.yml
66 lines (63 loc) · 1.59 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
version: "3"
services:
pasteme-frontend:
image: pasteme/frontend:3.4.2
container_name: pasteme-frontend
depends_on:
- pasteme-backend
healthcheck:
test: ["CMD", "curl", "-so", "/dev/null", "localhost:8080/usr/config.json"]
interval: 45s
timeout: 3s
retries: 3
restart: always
ports:
- 80:8080
volumes:
- ./data/nginx-logs/:/var/lib/pasteme/
- ./data/frontend-usr/:/www/pasteme/usr/
pasteme-backend:
image: pasteme/go-backend:3.5.2
container_name: pasteme-backend
depends_on:
- pasteme-mysql
healthcheck:
test: ["CMD", "wget", "-O", "/dev/null", "localhost:8000/api/v3/?method=beat"]
interval: 45s
timeout: 3s
retries: 3
restart: always
volumes:
- ./data/backend-config/:/etc/pastemed/
logging:
driver: "json-file"
options:
max-file: "3"
max-size: "128m"
pasteme-mysql:
image: mysql:5.5
container_name: pasteme-mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 45s
timeout: 3s
retries: 3
restart: always
command: [
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
environment:
MYSQL_USER: username
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: pasteme
MYSQL_MAX_ALLOWED_PACKET: 128M
MYSQL_INNODB_LOG_FILE_SIZE: 64M
volumes:
- ./data/mysql:/var/lib/mysql
logging:
driver: "json-file"
options:
max-file: "3"
max-size: "128m"