vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 5b620ba6cda3ae70e8661d134713bac531a251ff
parent 596c9b869185a86d7619024066c80a008102199e
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Mon,  6 Jul 2020 18:15:18 +0200

Merge pull request #1048 from jjlin/init

Add startup script to support init operations
Diffstat:
Mdocker/Dockerfile.j2 | 3++-
Mdocker/aarch64/mysql/Dockerfile | 3++-
Mdocker/aarch64/sqlite/Dockerfile | 3++-
Mdocker/amd64/mysql/Dockerfile | 3++-
Mdocker/amd64/mysql/Dockerfile.alpine | 3++-
Mdocker/amd64/postgresql/Dockerfile | 3++-
Mdocker/amd64/postgresql/Dockerfile.alpine | 3++-
Mdocker/amd64/sqlite/Dockerfile | 3++-
Mdocker/amd64/sqlite/Dockerfile.alpine | 3++-
Mdocker/armv6/mysql/Dockerfile | 3++-
Mdocker/armv6/sqlite/Dockerfile | 3++-
Mdocker/armv7/mysql/Dockerfile | 3++-
Mdocker/armv7/sqlite/Dockerfile | 3++-
Adocker/start.sh | 15+++++++++++++++
14 files changed, 41 insertions(+), 13 deletions(-)

diff --git a/docker/Dockerfile.j2 b/docker/Dockerfile.j2 @@ -288,9 +288,10 @@ COPY --from=build app/target/release/bitwarden_rs . {% endif %} COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/aarch64/mysql/Dockerfile b/docker/aarch64/mysql/Dockerfile @@ -125,9 +125,10 @@ COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/aarch64-unknown-linux-gnu/release/bitwarden_rs . COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/aarch64/sqlite/Dockerfile b/docker/aarch64/sqlite/Dockerfile @@ -119,9 +119,10 @@ COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/aarch64-unknown-linux-gnu/release/bitwarden_rs . COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/amd64/mysql/Dockerfile b/docker/amd64/mysql/Dockerfile @@ -93,9 +93,10 @@ COPY --from=vault /web-vault ./web-vault COPY --from=build app/target/release/bitwarden_rs . COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/amd64/mysql/Dockerfile.alpine b/docker/amd64/mysql/Dockerfile.alpine @@ -96,9 +96,10 @@ COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/x86_64-unknown-linux-musl/release/bitwarden_rs . COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/amd64/postgresql/Dockerfile b/docker/amd64/postgresql/Dockerfile @@ -93,9 +93,10 @@ COPY --from=vault /web-vault ./web-vault COPY --from=build app/target/release/bitwarden_rs . COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/amd64/postgresql/Dockerfile.alpine b/docker/amd64/postgresql/Dockerfile.alpine @@ -96,9 +96,10 @@ COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/x86_64-unknown-linux-musl/release/bitwarden_rs . COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/amd64/sqlite/Dockerfile b/docker/amd64/sqlite/Dockerfile @@ -87,9 +87,10 @@ COPY --from=vault /web-vault ./web-vault COPY --from=build app/target/release/bitwarden_rs . COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/amd64/sqlite/Dockerfile.alpine b/docker/amd64/sqlite/Dockerfile.alpine @@ -90,9 +90,10 @@ COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/x86_64-unknown-linux-musl/release/bitwarden_rs . COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/armv6/mysql/Dockerfile b/docker/armv6/mysql/Dockerfile @@ -125,9 +125,10 @@ COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/arm-unknown-linux-gnueabi/release/bitwarden_rs . COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/armv6/sqlite/Dockerfile b/docker/armv6/sqlite/Dockerfile @@ -119,9 +119,10 @@ COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/arm-unknown-linux-gnueabi/release/bitwarden_rs . COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/armv7/mysql/Dockerfile b/docker/armv7/mysql/Dockerfile @@ -124,9 +124,10 @@ COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/armv7-unknown-linux-gnueabihf/release/bitwarden_rs . COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/armv7/sqlite/Dockerfile b/docker/armv7/sqlite/Dockerfile @@ -118,9 +118,10 @@ COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/armv7-unknown-linux-gnueabihf/release/bitwarden_rs . COPY docker/healthcheck.sh /healthcheck.sh +COPY docker/start.sh /start.sh HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / -CMD ["/bitwarden_rs"] +CMD ["/start.sh"] diff --git a/docker/start.sh b/docker/start.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +if [ -r /etc/bitwarden_rs.sh ]; then + . /etc/bitwarden_rs.sh +fi + +if [ -d /etc/bitwarden_rs.d ]; then + for f in /etc/bitwarden_rs.d/*.sh; do + if [ -r $f ]; then + . $f + fi + done +fi + +exec /bitwarden_rs "${@}"