-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathdocker-compose.yml
53 lines (50 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
42
43
44
45
46
47
48
49
50
51
52
53
version: "3"
services:
pasteme-backend:
build: .
container_name: pasteme-backend
depends_on:
- pasteme-mysql
healthcheck:
test: ["CMD", "wget", "localhost:8000/api/v3/?method=beat", "--output=/dev/null"]
interval: 30s
timeout: 3s
retries: 3
restart: always
logging:
options:
max-size: "16m"
volumes:
- ./backend/config/:/etc/pastemed/
- ./backend/data/:/data/
ports:
- 8000:8000
networks:
- pasteme-network
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:
- ./mysql:/var/lib/mysql
networks:
- pasteme-network
networks:
pasteme-network:
external: true