Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1487c54d3 | ||
|
|
778a0a16e8 | ||
|
|
8fce19e3d4 | ||
|
|
74d87126ea | ||
|
|
4effafe3a1 | ||
|
|
cbe6326284 |
@@ -2,3 +2,9 @@
|
||||
|
||||
controllers:
|
||||
resource: routing.controllers
|
||||
|
||||
login_check:
|
||||
path: /login_check
|
||||
|
||||
api_logout:
|
||||
path: /api/logout
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
parameters:
|
||||
app.version: '0.1.12'
|
||||
app.version: '0.1.15'
|
||||
|
||||
@@ -185,27 +185,18 @@ sudo chmod 644 config/jwt/private.pem config/jwt/public.pem
|
||||
mkdir -p uploads
|
||||
```
|
||||
|
||||
### 8. Configurer Nginx systeme
|
||||
### 8. Configurer Nginx systeme (reverse proxy + maintenance)
|
||||
|
||||
Creer `/etc/nginx/sites-available/coltura.conf` :
|
||||
Copier la config reverse proxy depuis le repo :
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
server_name coltura.malio-dev.fr;
|
||||
|
||||
client_max_body_size 55m;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8083;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
```bash
|
||||
sudo cp infra/prod/nginx-proxy.conf /etc/nginx/sites-available/coltura.conf
|
||||
```
|
||||
|
||||
Ou creer `/etc/nginx/sites-available/coltura.conf` manuellement (voir `infra/prod/nginx-proxy.conf`).
|
||||
|
||||
La config inclut le **mode maintenance** : si le fichier `/var/www/coltura/maintenance.on` existe, Nginx renvoie une 503 avec `maintenance.html`.
|
||||
|
||||
Activer le site :
|
||||
|
||||
```bash
|
||||
@@ -213,6 +204,18 @@ sudo ln -sf /etc/nginx/sites-available/coltura.conf /etc/nginx/sites-enabled/col
|
||||
sudo nginx -t && sudo systemctl reload nginx
|
||||
```
|
||||
|
||||
### Mode maintenance
|
||||
|
||||
```bash
|
||||
# Activer la maintenance
|
||||
touch /var/www/coltura/maintenance.on
|
||||
|
||||
# Desactiver la maintenance
|
||||
rm /var/www/coltura/maintenance.on
|
||||
```
|
||||
|
||||
Optionnel : creer une page `/var/www/coltura/public/maintenance.html` personnalisee.
|
||||
|
||||
### 9. Deployer
|
||||
|
||||
```bash
|
||||
|
||||
7
frontend/layouts/auth.vue
Normal file
7
frontend/layouts/auth.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div class="min-h-screen bg-tertiary-500 from-tertiary-500 via-white to-neutral-100 text-neutral-900">
|
||||
<main class="mx-auto flex min-h-screen w-full max-w-[720px] items-center px-6 py-12">
|
||||
<slot />
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
31
infra/prod/nginx-proxy.conf
Normal file
31
infra/prod/nginx-proxy.conf
Normal file
@@ -0,0 +1,31 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name coltura.malio-dev.fr;
|
||||
|
||||
root /var/www/coltura/public;
|
||||
|
||||
# Maintenance mode
|
||||
if (-f /var/www/coltura/maintenance.on) {
|
||||
return 503;
|
||||
}
|
||||
|
||||
error_page 503 @maintenance;
|
||||
|
||||
location @maintenance {
|
||||
rewrite ^(.*)$ /maintenance.html break;
|
||||
}
|
||||
|
||||
location = /maintenance.html {
|
||||
internal;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8083;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
client_max_body_size 55m;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user