Skip to content

Commit 132016f

Browse files
author
Mike Holloway
committed
move from MySQL 5.7 to MariaDB 10(.4)
1 parent 894d464 commit 132016f

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ Docker compose file for [TeamPass](https://teampass.net). Requires Docker swarm.
66

77
Edit docker-compose.yaml and replace fqdn.example.com with your swarm http address. TeamPass database credentials for later configuration are also found within this same file.
88

9+
MariaDB will initially deploy a container with --skip-networking enabled, which prevents TeamPass from connecting. You should bounce the stack after MariaDB first initializes before attempting to configure TeamPass. The script below will wait for the MariaDB container to come and then wait 2 minutes for it to initialize, but you can also just watch the container logs.
10+
911
```
1012
docker stack deploy -c docker-compose.yml teampass
13+
while true; do docker service ls | grep mariadb | grep 1/1; if [ $? -eq 0 ]; then break; fi; done; sleep 120
14+
docker stack rm teampass
15+
docker stack deploy -c docker-compose.yml teampass
1116
```
1217

1318
[swarmstack](https://github.com/swarmstack/swarmstack) users should use docker-compose-swarmstack.yml above instead.

bounce-swarmstack

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
./down
4+
sleep 5
5+
./up-swarmstack

docker-compose-swarmstack.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ volumes:
2020
driver_opts:
2121
repl: 2
2222
size: 1
23-
teampass-mysql:
23+
teampass-mariadb:
2424
driver: pxd
2525
driver_opts:
2626
repl: 2
@@ -47,7 +47,7 @@ services:
4747
- teampass-php:/var/php/session
4848

4949
db:
50-
image: mysql/mysql-server:5.7
50+
image: mariadb:10
5151
deploy:
5252
mode: replicated
5353
placement:
@@ -60,4 +60,4 @@ services:
6060
MYSQL_PASSWORD: teampass
6161
MYSQL_USER: teampass
6262
volumes:
63-
- teampass-mysql:/var/lib/mysql
63+
- teampass-mariadb:/var/lib/mysql

docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
- ./local_bind_volume_dir/var/php/session:/var/php/session
2323

2424
db:
25-
image: mysql/mysql-server:5.7
25+
image: mariadb:10
2626
deploy:
2727
mode: replicated
2828
replicas: 1
@@ -32,4 +32,4 @@ services:
3232
MYSQL_PASSWORD: teampass
3333
MYSQL_USER: teampass
3434
volumes:
35-
- ./local_bind_volume_dir/var/lib/mysql:/var/lib/mysql
35+
- ./local_bind_volume_dir:/var/lib/mysql

up-swarmstack

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
docker stack deploy -c docker-compose-swarmstack.yaml teampass

0 commit comments

Comments
 (0)