From 084d731f45a0fa5cd9a5c68c600a8293dd134288 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Mon, 3 Mar 2025 12:29:13 +0800 Subject: [PATCH] up(etc): system file --- VaultWarden/env.cfg | 3 +++ VaultWarden/stack.yml | 15 +++++++++++++++ etc/profile.d/bash_completion.sh | 16 ++++++++++++++++ etc/profile.d/history.sh | 2 ++ 4 files changed, 36 insertions(+) create mode 100644 VaultWarden/env.cfg create mode 100644 VaultWarden/stack.yml create mode 100644 etc/profile.d/bash_completion.sh create mode 100644 etc/profile.d/history.sh diff --git a/VaultWarden/env.cfg b/VaultWarden/env.cfg new file mode 100644 index 0000000..9b75b64 --- /dev/null +++ b/VaultWarden/env.cfg @@ -0,0 +1,3 @@ +IMAGE_TAG=vaultwarden/server:1.33.2-alpine +Volumes_Path=/data/volumes/q +Domain=https://passd.6t7.net \ No newline at end of file diff --git a/VaultWarden/stack.yml b/VaultWarden/stack.yml new file mode 100644 index 0000000..1b8f763 --- /dev/null +++ b/VaultWarden/stack.yml @@ -0,0 +1,15 @@ +# path:: mkdir -pv /data/volumes/VaultWarden/data +# pull:: docker compose -p memos --env-file ./VaultWarden/env.cfg -f ./VaultWarden/stack.yml pull +# run:: docker compose -p memos --env-file ./VaultWarden/env.cfg -f ./VaultWarden/stack.yml up -d + +services: + vaultwarden: + image: ${IMAGE_TAG} + container_name: vaultwarden + restart: unless-stopped + environment: + DOMAIN: "${Domain}" + volumes: + - ${Volumes_Path}/data/:/data/ + ports: + - 5580:80 \ No newline at end of file diff --git a/etc/profile.d/bash_completion.sh b/etc/profile.d/bash_completion.sh new file mode 100644 index 0000000..efb269c --- /dev/null +++ b/etc/profile.d/bash_completion.sh @@ -0,0 +1,16 @@ +# shellcheck shell=sh disable=SC1091,SC2039,SC2166 +# Check for interactive bash and that we haven't already been sourced. +if [ "x${BASH_VERSION-}" != x -a "x${PS1-}" != x -a "x${BASH_COMPLETION_VERSINFO-}" = x ]; then + + # Check for recent enough version of bash. + if [ "${BASH_VERSINFO[0]}" -gt 4 ] || + [ "${BASH_VERSINFO[0]}" -eq 4 -a "${BASH_VERSINFO[1]}" -ge 2 ]; then + [ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] && + . "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" + if shopt -q progcomp && [ -r /usr/share/bash-completion/bash_completion ]; then + # Source completion code. + . /usr/share/bash-completion/bash_completion + fi + fi + +fi \ No newline at end of file diff --git a/etc/profile.d/history.sh b/etc/profile.d/history.sh new file mode 100644 index 0000000..c70d0f8 --- /dev/null +++ b/etc/profile.d/history.sh @@ -0,0 +1,2 @@ +export HISTSIZE=10000 +export HISTTIMEFORMAT="%F %T `whoami` " \ No newline at end of file