Initial commit
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
data/
|
||||||
45
README.md
Normal file
45
README.md
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
## Site web Caddy avec Docker Compose
|
||||||
|
|
||||||
|
Syncthing est un logiciel de synchronisation de fichiers en pair-à-pair (P2P) qui permet de synchroniser des fichiers entre plusieurs appareils de manière décentralisée et sécurisée, sans passer par un serveur central. https://syncthing.net/
|
||||||
|
|
||||||
|
## 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
|
||||||
|
```
|
||||||
26
docker-compose.yml
Normal file
26
docker-compose.yml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
services:
|
||||||
|
syncthing:
|
||||||
|
image: syncthing/syncthing
|
||||||
|
container_name: syncthing
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./data:/var/syncthing
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
networks:
|
||||||
|
- reverse-proxy
|
||||||
|
ports:
|
||||||
|
- "8384:8384"
|
||||||
|
- "22000:22000/tcp"
|
||||||
|
- "22000:22000/udp"
|
||||||
|
- "21027:21027/udp"
|
||||||
|
healthcheck:
|
||||||
|
test: curl -fkLsS -m 2 127.0.0.1:8384/rest/noauth/health | grep -o --color=never OK || exit 1
|
||||||
|
interval: 1m
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
|
||||||
|
networks:
|
||||||
|
reverse-proxy:
|
||||||
|
external: true
|
||||||
Reference in New Issue
Block a user