2019-04-15 15:04:16 +00:00
|
|
|
version: '3'
|
|
|
|
services:
|
|
|
|
backup:
|
2019-12-05 09:26:46 +00:00
|
|
|
build: ./src
|
2019-04-15 15:04:16 +00:00
|
|
|
env_file:
|
2019-12-03 08:40:02 +00:00
|
|
|
- restic_compose_backup.env
|
2019-12-05 09:15:09 +00:00
|
|
|
- alerts.env
|
2019-12-10 06:57:37 +00:00
|
|
|
labels:
|
|
|
|
restic-compose-backup.volumes: true
|
|
|
|
restic-compose-backup.volumes.include: 'src'
|
2019-04-15 15:04:16 +00:00
|
|
|
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-12-06 09:53:51 +00:00
|
|
|
# Map local restic repository for dev
|
2019-11-26 19:00:54 +00:00
|
|
|
- ./restic_data:/restic_data
|
2019-12-06 09:53:51 +00:00
|
|
|
# Map restic cache
|
2019-12-04 22:49:32 +00:00
|
|
|
- ./restic_cache:/cache
|
|
|
|
# Map in project source in dev
|
2019-12-05 09:26:46 +00:00
|
|
|
- ./src:/restic-compose-backup
|
2019-04-16 22:09:13 +00:00
|
|
|
web:
|
|
|
|
image: nginx
|
|
|
|
labels:
|
2019-12-03 08:40:02 +00:00
|
|
|
restic-compose-backup.volumes: true
|
|
|
|
restic-compose-backup.volumes.include: "/tests"
|
2019-04-16 22:09:13 +00:00
|
|
|
volumes:
|
2019-12-09 05:32:31 +00:00
|
|
|
- ./src/tests:/srv/tests
|
2019-04-16 22:09:13 +00:00
|
|
|
- ./.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:
|
2019-12-03 08:40:02 +00:00
|
|
|
restic-compose-backup.mysql: true
|
2019-04-19 04:34:33 +00:00
|
|
|
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-03 08:40:02 +00:00
|
|
|
restic-compose-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-12-03 00:40:30 +00:00
|
|
|
postgres:
|
2019-12-03 05:21:51 +00:00
|
|
|
image: postgres:11
|
2019-12-03 00:40:30 +00:00
|
|
|
labels:
|
2019-12-03 08:40:02 +00:00
|
|
|
restic-compose-backup.postgres: true
|
2019-12-03 00:40:30 +00:00
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=pguser
|
|
|
|
- POSTGRES_PASSWORD=pgpassword
|
|
|
|
- POSTGRES_DB=test
|
|
|
|
volumes:
|
|
|
|
- pgdata:/var/lib/postgresql/data
|
|
|
|
|
2019-04-19 04:34:33 +00:00
|
|
|
volumes:
|
2019-11-12 11:10:19 +00:00
|
|
|
mysqldata:
|
2019-12-03 00:40:30 +00:00
|
|
|
mariadbdata:
|
|
|
|
pgdata:
|