# Credentials as Docker secrets instead of environment variables, so neither # "docker inspect" nor the compose file shows them. # # Before the first start, one file per secret, readable only by you: # mkdir -p .secrets && chmod 700 .secrets # printf '%s' '' > .secrets/.bwclientid # printf '%s' '' > .secrets/.bwsecret # printf '%s' '' > .secrets/.bwpassword # printf '%s' '' > .secrets/.exportpassword # chmod 400 .secrets/.* # # docker compose -f docker-compose.secrets.sample.yml up # # Every secret a *_FILE variable points to must also be listed under the # service's "secrets:", or its file is not mounted and the run stops with an # error naming the variable. services: bw-export: container_name: bw-export image: 0netx/bw-export:latest volumes: # One mount per folder. Mounting a parent such as /var does not work: the # image declares /var/data and /var/attachments as volumes, so Docker # puts anonymous volumes over them and the exports never reach the host. - ./export/data:/var/data - ./export/attachments:/var/attachments secrets: - bwclientid - bwsecret - bwpassword - exportpassword # - notificationurl # - pingurl environment: # Credentials (required). Each *_FILE variable holds the path of a file # with the value. - BW_CLIENTID_FILE=/run/secrets/bwclientid - BW_CLIENTSECRET_FILE=/run/secrets/bwsecret - BW_PASSWORD_FILE=/run/secrets/bwpassword # Encryption (recommended). - EXPORT_PASSWORD_FILE=/run/secrets/exportpassword # Server: leave commented out for bitwarden.com. # - BW_URL_SERVER=https://vault.example.com # Organizations: by default every one you own or administer. IDs, or "none". # - BW_ORGANIZATIONS_LIST=, # Retention. # - KEEP_LAST_BACKUPS=5 # Log, notifications and monitoring. Uncomment each URL together with its # secret above and below, once its file exists: Compose refuses to start # with a secret whose file does not exist. # - FILE_LOG=/var/data/bw-export-logfile.log # - NOTIFICATION_URL_FILE=/run/secrets/notificationurl # - PING_URL_FILE=/run/secrets/pingurl secrets: bwclientid: file: ./.secrets/.bwclientid bwsecret: file: ./.secrets/.bwsecret bwpassword: file: ./.secrets/.bwpassword exportpassword: file: ./.secrets/.exportpassword # notificationurl: # file: ./.secrets/.notificationurl # pingurl: # file: ./.secrets/.pingurl