-
-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
30 lines (28 loc) · 706 Bytes
/
docker-compose.yml
File metadata and controls
30 lines (28 loc) · 706 Bytes
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
version: '3.8'
services:
mysql-db:
image: mariadb:10.3.23
container_name: mysql-db
command: --default-authentication-plugin=mysql_native_password
restart: unless-stopped
security_opt:
- seccomp:unconfined
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- MYSQL_USER=dba
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=my_db
volumes:
- ./data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysql" ,"-h", "mysql-db", "-P", "3306", "-u", "root", "-prootpassword", "-e", "SELECT VERSION()"]
interval: 5s
timeout: 3s
retries: 30
networks:
- public
networks:
public:
name: public