Compare commits

..

2 Commits

Author SHA1 Message Date
knoflook 62f1b0f6cf chore: publish 0.3.0+1.26.0 release 2023-01-21 12:07:29 +01:00
knoflook e58aa8cb50 add smtp support 2023-01-21 12:05:46 +01:00
19 changed files with 23 additions and 231 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ kind: pipeline
name: deploy to swarm-test.autonomic.zone
steps:
- name: deployment
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
image: decentral1se/stack-ssh-deploy:latest
settings:
host: swarm-test.autonomic.zone
stack: vaultwarden
@@ -34,7 +34,7 @@ steps:
from_secret: drone_abra-bot_token
fork: true
repositories:
- toolshed/auto-recipes-catalogue-json
- coop-cloud/auto-recipes-catalogue-json
trigger:
event: tag
+4 -17
View File
@@ -3,8 +3,6 @@ TYPE=vaultwarden
DOMAIN=vaultwarden.example.com
LETS_ENCRYPT_ENV=production
COMPOSE_FILE="compose.yml"
WEBSOCKET_ENABLED=true
SIGNUPS_ALLOWED=true
@@ -15,22 +13,11 @@ LOG_LEVEL=warn
SECRET_ADMIN_TOKEN_VERSION=v1 # length=48
TX="Europe/Berlin"
## DB settings
#COMPOSE_FILE="$COMPOSE_FILE:compose.mariadb.yml"
#SECRET_DB_PASSWORD_VERSION=v1
#SECRET_DB_ROOT_PASSWORD_VERSION=v1
## SMTP settings
# SMTP settings
#COMPOSE_FILE="$COMPOSE_FILE:compose.smtp.yml"
#SECRET_SMTP_PASSWORD_VERSION=v1
#SMTP_ENABLED=1
#SMTP_FROM=noreply@example.com
#SMTP_USERNAME=noreply@example.com
#SMTP_HOST=mail.example.com
#SMTP_FROM=
#SMTP_USERNAME=
#SMTP_HOST=
#SMTP_PORT=587
#SMTP_SECURITY=starttls
# If SMTP isn't working, enable this line to debug
# remember to disable it after debugging
#SMTP_DEBUG=true
-16
View File
@@ -1,16 +0,0 @@
---
name: "Vaultwarden pull request template"
about: "Vaultwarden pull request template"
---
<!--
Thank you for doing recipe maintenance work!
Please mark all checklist items which are relevant for your changes.
Please remove the checklist items which are not relevant for your changes.
Feel free to remove this comment.
-->
* [ ] I have deployed and tested my changes
* [ ] I have [updated relevant versions in `abra.sh`](https://docs.coopcloud.tech/maintainers/upgrade/#updating-versions-in-the-abrash)
* [ ] I have made my environment variable changes [backwards compatible](https://docs.coopcloud.tech/maintainers/upgrade/#backwards-compatible-environment-variable-changes)
* [ ] I have added a [release note entry](https://docs.coopcloud.tech/maintainers/upgrade/#creating-new-release-notes)
-32
View File
@@ -1,32 +0,0 @@
# Vaultwarden Recipe Maintenance
All contributions should be made via a pull request. This is to ensure a
certain quality and consistency, that others can rely on.
## Maintainer Responsibilities
A recipe maintainer has the following responsibilities:
- Respond to pull requests / issues within a week
- Make image security updates within a day
- Make image patch / minor updates within a week
- Make image major updates within a month
In order to fullfill these responsibilities a recipe maintainer:
- Has to watch the repository (to get notifications)
- Needs to make sure renovate is configured properly
## Pull Requests
A pull request can be merged if it is approved by at least one maintainer. For
pull requests opened by a maintainer they need to be approved by another
maintainer. Even though it is okay to merge a pull request with one approval, it
is always better if all maintainers looked at the pull request and approved it.
## Become a maintainer
Everyone can apply to be a recipe maintainer:
1. Watch the repository to always get updates
2. Simply add your self to the list in the [README.md](./README.md) and open a new pull request with the change.
3. Once the pull request gets merged you will be added to the [vaultwarden maintainers team](https://git.coopcloud.tech/org/coop-cloud/teams/vw-maintainers).
+3 -8
View File
@@ -3,13 +3,13 @@
> Open source password manager
<!-- metadata -->
* **Maintainer**: [@fauno](https://git.coopcloud.tech/fauno), [@ammaratef45](https://git.coopcloud.tech/ammaratef45)
* **Category**: Apps
* **Status**: 2, beta
* **Image**: [`vaultwarden/server`](https://hub.docker.com/vaultwarden/server), 4, upstream
* **Healthcheck**: 3
* **Backups**: Yes
* **Email**: Yes
* **Backups**: No
* **Email**: No
* **Tests**: No
* **SSO**: No
@@ -21,8 +21,6 @@
2. Deploy [`coop-cloud/traefik`]
3. `abra app new vaultwarden`
4. `abra app config YOURAPPDOMAIN`
5. `abra app cmd -l YOURAPPDOMAIN insert_vaultwarden_admin_token` will insert a hashed `admin_token` as password as recommended by vaultwarden. Will echo the admin_token to your cli.
6. `abra app secret insert YOURAPPDOMAIN smtp_password v1 "super-secret-password"` SMTP config and password needed for user email invites
5. `abra app deploy YOURAPPDOMAIN`
[`abra`]: https://git.coopcloud.tech/coop-cloud/abra
@@ -30,9 +28,6 @@
## Tips & Tricks
### Using MariaDB instead of SQLite
Just comment in the `DB settings` section in your .env
### Wiring up `fail2ban`
You need the following logging config:
+1 -22
View File
@@ -1,27 +1,6 @@
export APP_ENTRYPOINT_VERSION=v4
export APP_ENTRYPOINT_VERSION=v1
APP_DIR="app:/data"
insert_vaultwarden_admin_token() {
if ! command -v argon2 &> /dev/null; then
echo "argon2 is required on your local machine to hash the admin token."
echo "It could not be found in your PATH, please install argon2 to proceed."
echo "For example: On a debian/ubuntu system, run `apt install argon2`"
exit 1
fi
PASS=$(openssl rand 64 | openssl enc -A -base64)
# -e: output encoded hash, -id: use Argon2id, -k: memory cost, -t: time cost, -p: parallelism
HASH=$(echo -n "$PASS" | argon2 "$(openssl rand -base64 32)" -e -id -k 65540 -t 3 -p 4)
if abra app secret insert -C "$APP_NAME" admin_token v1 "$HASH"; then
echo "Vaultwarden Admin Token is:"
echo "$PASS"
echo "TAKE NOTE OF IT NOW, WILL NEVER BE SHOWN AGAIN!"
else
echo "Failed to insert admin token."
exit 1
fi
}
_backup_app() {
# Copied _abra_backup_dir to make UX better on restore and backup
{
-51
View File
@@ -1,51 +0,0 @@
---
version: "3.8"
services:
app:
environment:
# DATABASE_URL with secret db_password is being set by entrypoint.sh.tmpl
- MYSQL_HOST=db
- MYSQL_DATABASE=vaultwarden
- MYSQL_USER=vaultwarden
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
secrets:
- db_password
db:
image: "mariadb:10.11" # or "mysql"
environment:
- MYSQL_DATABASE=vaultwarden
- MYSQL_USER=vaultwarden
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
- MAX_DB_CONNECTIONS=${MAX_DB_CONNECTIONS:-100}#
secrets:
- db_root_password
- db_password
volumes:
- "mariadb:/var/lib/mysql"
networks:
- internal
deploy:
labels:
backupbot.backup.pre-hook: 'mysqldump --single-transaction -u root -p"$$(cat /run/secrets/db_root_password)" $${MYSQL_DATABASE} > /var/lib/mysql/backup.sql'
backupbot.backup.volumes.mariadb.path: "backup.sql"
backupbot.restore.post-hook: 'mysql -u root -p"$$(cat /run/secrets/db_root_password)" $${MYSQL_DATABASE} < /var/lib/mysql/backup.sql'
healthcheck:
test: ["CMD-SHELL", 'mysqladmin -p"$$(cat /run/secrets/db_root_password)" ping']
interval: 30s
timeout: 10s
retries: 30
start_period: 1m
secrets:
db_root_password:
external: true
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
db_password:
external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
volumes:
mariadb:
+8 -10
View File
@@ -1,19 +1,17 @@
---
version: "3.8"
services:
app:
environment:
- SMTP_FROM
- SMTP_HOST
- SMTP_PORT
- SMTP_SECURITY
- SMTP_USERNAME
- SMTP_PASSWORD_FILE=/run/secrets/smtp_password
secrets:
- smtp_password
environment:
- "SMTP_ENABLED"
- "SMTP_PASSWORD_FILE=/run/secrets/smtp_password"
- "SMTP_FROM"
- "SMTP_USERNAME"
- "SMTP_HOST"
- "SMTP_PORT"
- "SMTP_SECURITY"
- "SMTP_DEBUG"
secrets:
smtp_password:
+5 -12
View File
@@ -3,10 +3,9 @@ version: "3.8"
services:
app:
image: vaultwarden/server:1.36.0
image: vaultwarden/server:1.26.0
networks:
- proxy
- internal
environment:
- "DOMAIN=https://$DOMAIN"
- "WEBSOCKET_ENABLED=$WEBSOCKET_ENABLED"
@@ -16,13 +15,11 @@ services:
- "EXTENDED_LOGGING=$EXTENDED_LOGGING"
- "LOG_FILE=$LOG_FILE"
- "LOG_LEVEL=$LOG_LEVEL"
- "TX=${TX:-Europe/Berlin}"
configs:
- source: app_entrypoint
target: /docker-entrypoint.sh
mode: 0555
entrypoint: /docker-entrypoint.sh
# entrypoint: ['tail', '-f', '/dev/null']
command: /start.sh
secrets:
- admin_token
@@ -30,10 +27,9 @@ services:
- vaultwarden_data:/data
healthcheck:
test: curl -f http://localhost/alive || exit 1
interval: 30s
timeout: 10s
retries: 30
start_period: 1m
interval: 5s
timeout: 3s
retries: 10
deploy:
restart_policy:
condition: on-failure
@@ -43,9 +39,7 @@ services:
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "coop-cloud.${STACK_NAME}.version=2.2.0+1.36.0"
- "backupbot.backup=true"
- "backupbot.backup.path=/data"
- "coop-cloud.${STACK_NAME}.version=0.3.0+1.26.0"
volumes:
vaultwarden_data:
@@ -53,7 +47,6 @@ volumes:
networks:
proxy:
external: true
internal:
configs:
app_entrypoint:
-29
View File
@@ -1,24 +1,6 @@
#!/bin/bash
set -e
umask 027
# set DATABASE_URL with db_password
set_db_url() {
if test -f "/var/run/secrets/db_password"; then
pwd=`cat /var/run/secrets/db_password`
if [ -z $pwd ]; then
echo >&2 "error: /var/run/secrets/db_password is empty"
exit 1
fi
echo "entrypoint.sh setting DATABASE_URL"
export "DATABASE_URL"="mysql://vaultwarden:${pwd}@db/vaultwarden"
unset "pwd"
else
echo >&2 "error: /var/run/secrets/db_password does not exist"
exit 1
fi
}
file_env() {
local var="$1"
@@ -42,19 +24,8 @@ file_env() {
unset "$fileVar"
}
if [ -n "${MYSQL_HOST}" ]; then
set_db_url
fi
file_env "ADMIN_TOKEN"
{{ if eq (env "SMTP_ENABLED") "1" }}
file_env "SMTP_PASSWORD"
{{ end }}
# remove world permissions on data
chmod -R o= /data
# upstream startup command
# https://github.com/dani-garcia/vaultwarden/blob/60ed5ff99d15dec0b82c85987f9a3e244b8bde91/docker/Dockerfile.j2#L254
/start.sh
-1
View File
@@ -1 +0,0 @@
ATTENTION: this version is not automatically upgradeable due to missing entrypoint version increase. Please upgrade to at least 1.0.4+1.32.7 directly.
-1
View File
@@ -1 +0,0 @@
ATTENTION: this version is not automatically upgradeable due to missing entrypoint version increase. Please upgrade to at least 1.0.4+1.32.7 directly.
-1
View File
@@ -1 +0,0 @@
ATTENTION: this version is not automatically upgradeable due to missing entrypoint version increase. Please upgrade to at least 1.0.4+1.32.7 directly.
-1
View File
@@ -1 +0,0 @@
ATTENTION: this version is not automatically upgradeable due to missing entrypoint version increase. Please upgrade to at least 1.0.4+1.32.7 directly.
-1
View File
@@ -1 +0,0 @@
bugfix release for missing increase of entrypoint version for the last 4 releases. Also upgraded vaultwarden bugfix release.
-15
View File
@@ -1,15 +0,0 @@
=== SMTP SETTINGS ===
This release contains a *breaking change* if you use SMTP with vaultwarden.
See https://git.coopcloud.tech/coop-cloud/vaultwarden/pulls/9 for more.
TLDR; Please add `SMTP_ENABLED=1` to your .env to continue using SMTP.
=== PERMISSIONS ===
Previously, the data directory including the main private key had read
permissions enabled for all host users. This release fixes that. Please review
your Vaultwarden keys if other users on your Co-op Cloud host may have had
access to these files.
See https://git.coopcloud.tech/coop-cloud/vaultwarden/pulls/7 for more.
-1
View File
@@ -1 +0,0 @@
Allows support for 2026.1+ clients.
-1
View File
@@ -1 +0,0 @@
https://github.com/dani-garcia/vaultwarden/releases/tag/1.36.0
-10
View File
@@ -1,10 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"reviewers": [
"ammaratef45",
"fauno"
]
}