Update README.md

This commit is contained in:
Adrien Bourmault 2023-04-03 21:03:48 +00:00
parent f82ba579b9
commit 3e0242d32b
1 changed files with 71 additions and 0 deletions

View File

@ -475,6 +475,77 @@ sudo -u postgres psql
CREATE DATABASE movim OWNER movim;
```
#### Configuration de movim
En root :
```
chown www-data movim && chown www-data movim/public && chmod u+rwx movim
```
On crée le fichier de configuration :
```
cp /var/www/movim/.env.example /var/www/movim/.env
```
On édite ensuite le fichier `/var/www/movim/.env` :
```
# Database configuration
DB_DRIVER=pgsql
DB_HOST=localhost
DB_PORT=5432
DB_DATABASE=movim
DB_USERNAME=movim
DB_PASSWORD=movim
# Daemon configuration
DAEMON_URL=https://xmpp.chalec.org/ # Public URL of your Movim instance
DAEMON_PORT=8080 # Port on which the daemon will listen
DAEMON_INTERFACE=127.0.0.1 # Interface on which the daemon will listen, must be an IP
DAEMON_DEBUG=false
DAEMON_VERBOSE=false
```
Peupler la base de données avec cette configuration :
```
sudo -u www-data composer movim:migrate
```
Créer l'utilisateur d'administration (<jid> étant son identifiant):
```
php daemon.php setAdmin <jid>
```
#### Configuration du serveur web nginx
On ajoute/modifie dans le fichier `/etc/nginx/sites-enabled/xmpp.chalec.org.conf` :
```
root /var/www/movim/public/index.php;
http {
fastcgi_cache_path /tmp/nginx_cache levels=1:2 keys_zone=nginx_cache:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
}
location /picture {
include fastcgi_params;
add_header X-Cache $upstream_cache_status;
fastcgi_ignore_headers "Cache-Control" "Expires" "Set-Cookie";
fastcgi_cache nginx_cache;
fastcgi_cache_key $request_method$host$request_uri;
fastcgi_cache_valid any 7d;
}
```
### Mise à jour du serveur movim
Avec `vxxx` la dernière version :