Add README file
This commit is contained in:
parent
44837b5fc6
commit
025b984314
1 changed files with 67 additions and 0 deletions
67
README.md
Normal file
67
README.md
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
# Camarades
|
||||||
|
|
||||||
|
Gestion des membres & sympathisants pour le POP Vaud
|
||||||
|
|
||||||
|
## Récupérer les licences des modules Go
|
||||||
|
Installer l'utilitaire (si pas déjà fait)
|
||||||
|
```bash
|
||||||
|
./licences/install_tool.sh
|
||||||
|
```
|
||||||
|
Générer le fichier de licences (à faire avant build si nouveau module)
|
||||||
|
```bash
|
||||||
|
./licences/fetch_licences.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Générer une build
|
||||||
|
```bash
|
||||||
|
go build
|
||||||
|
```
|
||||||
|
|
||||||
|
## Déployer
|
||||||
|
Sur le serveur (en tant que `root`) :
|
||||||
|
```bash
|
||||||
|
useradd pop-camarades
|
||||||
|
mkdir /opt/pop-camarades
|
||||||
|
chown pop-camarades:pop-camarades /opt/pop-camarades
|
||||||
|
```
|
||||||
|
Sur la station de travail (avec une nouvelle build) :
|
||||||
|
```bash
|
||||||
|
scp pop-camarades root@serveur:/opt/pop-camarades/pop-camarades
|
||||||
|
scp .env.example root@serveur:/opt/pop-camarades/.env
|
||||||
|
```
|
||||||
|
Sur le serveur (en tant que `root`) :
|
||||||
|
```bash
|
||||||
|
cd /opt/pop-camarades
|
||||||
|
chmod +x pop-camarades
|
||||||
|
nano .env # Modifier les paramètres au besoin
|
||||||
|
```
|
||||||
|
Créer le fichier `/etc/systemd/system/pop-camarades.service` avec le contenu suivant :
|
||||||
|
```ini
|
||||||
|
[Unit]
|
||||||
|
Description=POP Camarades
|
||||||
|
ConditionPathExists=/opt/pop-camarades
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=pop-camarades
|
||||||
|
Group=pop-camarades
|
||||||
|
|
||||||
|
WorkingDirectory=/opt/pop-camarades
|
||||||
|
ExecStart=/opt/pop-camarades/pop-camarades
|
||||||
|
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10
|
||||||
|
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
Sur le serveur (en tant que `root`) :
|
||||||
|
```bash
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable --now pop-camarades
|
||||||
|
```
|
||||||
|
Mettre en place le proxy inversé de notre choix.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue