2019-04-15 15:04:16 +00:00
|
|
|
version: '3'
|
|
|
|
services:
|
|
|
|
backup:
|
|
|
|
build: .
|
|
|
|
env_file:
|
|
|
|
- restic_volume_backup.env
|
|
|
|
volumes:
|
2019-04-15 16:30:49 +00:00
|
|
|
# Map in docker socket
|
2019-04-15 15:04:16 +00:00
|
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
2019-11-26 19:00:54 +00:00
|
|
|
# Map backup database locally
|
|
|
|
- ./restic_data:/restic_data
|
2019-11-29 00:24:33 +00:00
|
|
|
- ./restic_cache:/restic_cache
|
2019-04-15 16:30:49 +00:00
|
|
|
# Map in project source
|
|
|
|
- .:/restic-volume-backup
|
2019-04-16 22:09:13 +00:00
|
|
|
web:
|
|
|
|
image: nginx
|
|
|
|
labels:
|
2019-04-19 04:34:33 +00:00
|
|
|
restic-volume-backup.volumes: true
|
2019-04-16 22:09:13 +00:00
|
|
|
restic-volume-backup.include: "/tests"
|
|
|
|
volumes:
|
|
|
|
- ./tests:/srv/tests
|
|
|
|
- ./.vscode:/srv/code
|
2019-04-19 04:34:33 +00:00
|
|
|
environment:
|
|
|
|
- SOME_VALUE=test
|
|
|
|
- ANOTHER_VALUE=1
|
2019-12-02 20:31:35 +00:00
|
|
|
|
2019-04-19 04:34:33 +00:00
|
|
|
mysql:
|
2019-11-29 04:35:55 +00:00
|
|
|
image: mysql:5
|
2019-04-19 04:34:33 +00:00
|
|
|
labels:
|
|
|
|
restic-volume-backup.mysql: true
|
|
|
|
environment:
|
|
|
|
- MYSQL_ROOT_PASSWORD=my-secret-pw
|
|
|
|
- MYSQL_DATABASE=mydb
|
|
|
|
- MYSQL_USER=myuser
|
|
|
|
- MYSQL_PASSWORD=mypassword
|
|
|
|
volumes:
|
|
|
|
- mysqldata:/var/lib/mysql
|
|
|
|
|
2019-12-02 20:31:35 +00:00
|
|
|
mariadb:
|
|
|
|
image: mariadb:10
|
|
|
|
labels:
|
2019-12-02 21:53:00 +00:00
|
|
|
restic-volume-backup.mariadb: true
|
2019-12-02 20:31:35 +00:00
|
|
|
environment:
|
|
|
|
- MYSQL_ROOT_PASSWORD=my-secret-pw
|
|
|
|
- MYSQL_DATABASE=mydb
|
|
|
|
- MYSQL_USER=myuser
|
|
|
|
- MYSQL_PASSWORD=mypassword
|
|
|
|
volumes:
|
|
|
|
- mariadbdata:/var/lib/mysql
|
|
|
|
|
2019-04-19 04:34:33 +00:00
|
|
|
volumes:
|
2019-11-12 11:10:19 +00:00
|
|
|
mysqldata:
|
2019-12-02 20:31:35 +00:00
|
|
|
mariadbdata:
|