Nouvelle route /report pour la création de ticket #1
80
README.md
80
README.md
@ -17,55 +17,57 @@ Mini-app Flask remplaçant les CGI scripts de `scodoc.iutv`.
|
|||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Créer un utilisateur
|
1. Créer un utilisateur
|
||||||
|
```bash
|
||||||
adduser installmgr
|
adduser installmgr
|
||||||
|
```
|
||||||
|
|
||||||
2. Cloner le dépot
|
2. Cloner le dépot
|
||||||
|
```bash
|
||||||
cd /opt
|
git clone https://scodoc.org/git/ScoDoc/installmgr.git /opt/installmgr
|
||||||
git clone https://scodoc.org/git/viennet/installmgr.git
|
chown -R installmgr:installmgr /opt/installmgr
|
||||||
chown -R installmgr installmgr
|
```
|
||||||
|
|
||||||
3. Créer l'environnement
|
3. Créer l'environnement
|
||||||
|
```bash
|
||||||
su - installmgr
|
su - installmgr
|
||||||
cd /opt/installmgr
|
cd /opt/installmgr
|
||||||
python3 -m venv venv
|
python3 -m venv venv
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
pip install wheel
|
pip install wheel
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
4. Créer les répertoires
|
4. Créer les répertoires
|
||||||
|
```bash
|
||||||
mkdir incoming_dumps
|
mkdir incoming_dumps
|
||||||
# et éventuellement:
|
# et éventuellement:
|
||||||
echo 1000 > counter
|
echo 1000 > counter
|
||||||
|
```
|
||||||
|
|
||||||
5. Configurer nginx
|
5. Configurer nginx
|
||||||
|
```nginx
|
||||||
location /scodoc-installmgr {
|
location /scodoc-installmgr {
|
||||||
# forward application requests to the gunicorn server
|
# forward application requests to the gunicorn server
|
||||||
proxy_pass http://localhost:8010;
|
proxy_pass http://localhost:8010;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto https;
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
proxy_connect_timeout 120;
|
proxy_connect_timeout 120;
|
||||||
client_max_body_size 100m;
|
client_max_body_size 100m;
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
6. Installer le service
|
6. Installer le service
|
||||||
|
```bash
|
||||||
cp etc/installmgr.service /etc/systemd/system/
|
cp etc/installmgr.service /etc/systemd/system/
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl start installmgr
|
systemctl start installmgr
|
||||||
|
```
|
||||||
7. Tester
|
7. Tester
|
||||||
|
|
||||||
Depuis un client extérieur,
|
Depuis un client extérieur,
|
||||||
|
```bash
|
||||||
http https://scodoc.org/scodoc-installmgr/last_stable_version
|
http https://scodoc.org/scodoc-installmgr/last_stable_version
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user