-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
56 lines (53 loc) · 1.53 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
version: '2'
services:
# See https://hub.docker.com/_/mariadb/ for details of the MariaDB image.
# MYSQL_DATABASE - name of database
# MYSQL_ROOT_PASSWORD - superuser password for MariaDB
# MYSQL_USER - database user
# MYSQL_PASSWORD - database user password
db:
image: mariadb:10
volumes:
- ./application:/data
- ./mybackups:/backup
ports:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: r00tp@ss!
MYSQL_DATABASE: world
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
ports:
- "8001:80"
environment:
PMA_HOST: db
PMA_USER: root
PMA_PASSWORD: r00tp@ss!
# MYSQL_HOST - hostname of the database server
# MYSQL_USER - user that accesses the database
# MYSQL_PASSWORD - password for the MYSQL_USER
# DB_NAME - name of database to back up/restore
restore:
build: ./
volumes:
- ./application:/data
- ./mybackups:/backup
environment:
MYSQL_HOST: db
MYSQL_USER: root
MYSQL_PASSWORD: r00tp@ss!
BACKUP_DIR: /backup
DB_NAME: world
MODE: restore
backup:
build: ./
volumes:
- ./application:/data
- ./mybackups:/backup
environment:
MYSQL_HOST: db
MYSQL_USER: root
MYSQL_PASSWORD: r00tp@ss!
BACKUP_DIR: /backup
DB_NAME: world
MODE: backup