From 4d0c49a6777d76b8dd6b8a3f5816c2397cb0d3b6 Mon Sep 17 00:00:00 2001 From: Lucas Date: Wed, 4 Jun 2025 12:51:05 +0000 Subject: [PATCH] Initial commit --- .gitignore | 2 ++ README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ app-public.env | 2 ++ docker-compose.yml | 15 +++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 app-public.env create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..30e2d7f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +vw-data/ +app.env \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..bd25497 --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +## Site web Caddy avec Docker Compose + +Vaultwarden est une version auto-hébergeable de Bitwarden, un gestionnaire de mots de passe open-source. Il permet de stocker, partager et synchroniser des mots de passe de manière sécurisée. https://github.com/dani-garcia/vaultwarden + +## Prérequis + +- Git, Docker & Docker Compose installés + +- Cette installation est faite pour fonctionner derrière un reverse-proxy. Exemple ici : https://gitea.lucasroyer.fr/server/reverse-proxy + +## Installation + +1. Clonez ce dépôt : +```bash +git clone https://gitea.lucasroyer.fr/server/gitea.git +cd gitea +``` +2. Modifiez app.env pour ajouter un mot de passe en remplaçant `mypassword` : +```bash +cp app.public.env app.env +nano app.env +``` + +```ini +GITEA__database__DB_TYPE=postgres +GITEA__database__HOST=db:5432 +GITEA__database__NAME=gitea +GITEA__database__USER=gitea +GITEA__database__PASSWD=mypassword #replace +``` +2. Modifiez db.env avec le même mot de passe : +```bash +cp db.public.env db.env +nano db.env +``` +```ini +POSTGRES_USER=gitea +POSTGRES_PASSWORD=mypassword #replace +POSTGRES_DB=gitea +``` +4. Lancez et surveillez les conteneurs : +```bash +sudo docker compose up -d +sudo docker compose logs -f +``` diff --git a/app-public.env b/app-public.env new file mode 100644 index 0000000..6c2534a --- /dev/null +++ b/app-public.env @@ -0,0 +1,2 @@ +WEBSOCKET_ENABLED=true +ADMIN_TOKEN= diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..452dda5 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +services: + vaultwarden: + image: vaultwarden/server:latest + container_name: vaultwarden + restart: always + volumes: + - ./vw-data:/data + env_file: + - app.env + networks: + - reverse-proxy + +networks: + reverse-proxy: + external: true