feat: add docker-compose file

This commit is contained in:
ttionya
2020-06-05 19:23:29 +08:00
parent b9e5ab9983
commit 6688f66fe7
2 changed files with 29 additions and 1 deletions

28
docker-compose.yml Normal file
View File

@@ -0,0 +1,28 @@
version: '3'
services:
bitwardenrs:
image: bitwardenrs/server:1.15.0
restart: always
# environment:
# SIGNUPS_ALLOWED: 'false'
# ADMIN_TOKEN: 'your authentication token'
ports:
- '127.0.0.1:8200:80'
volumes:
- ./data:/data/
backup:
image: ttionya/bitwardenrs-backup:latest
restart: always
# environment:
# RCLONE_REMOTE_NAME: 'BitwardenBackup'
# RCLONE_REMOTE_DIR: '/BitwardenBackup/'
# CRON: '5 * * * *'
# ZIP_ENABLE: 'TRUE'
# ZIP_PASSWORD: 'WHEREISMYPASSWORD?'
# BACKUP_KEEP_DAYS: 0
volumes:
- ./data:/bitwarden/data/
- ./rclone:/config/rclone/

View File

@@ -41,7 +41,7 @@ function check_rclone_connection() {
########################################
function init_env() {
# CRON
local CRON_DEFAULT="0 1 * * *"
local CRON_DEFAULT="5 * * * *"
if [[ -z "${CRON}" ]]; then
CRON="${CRON_DEFAULT}"
fi