Version initiale du site RSU pour le déploiement
This commit is contained in:
28
configuration/nginx-rsu.conf
Normal file
28
configuration/nginx-rsu.conf
Normal file
@@ -0,0 +1,28 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name rsu.gov.bf;
|
||||
|
||||
root /var/www/rsu;
|
||||
index index.html;
|
||||
client_max_body_size 25M;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8096;
|
||||
proxy_http_version 1.1;
|
||||
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;
|
||||
}
|
||||
|
||||
location /uploads/ {
|
||||
proxy_pass http://127.0.0.1:8096;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
expires 1h;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
18
configuration/rsu-backend.service
Normal file
18
configuration/rsu-backend.service
Normal file
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=API du portail ST-RSU
|
||||
After=network.target postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=rsu
|
||||
Group=rsu
|
||||
WorkingDirectory=/opt/rsu/backend
|
||||
EnvironmentFile=/etc/rsu/rsu.env
|
||||
ExecStart=/usr/bin/java -jar /opt/rsu/backend/rsu-api.jar --spring.profiles.active=prod
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
SuccessExitStatus=143
|
||||
NoNewPrivileges=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
18
configuration/rsu.env.example
Normal file
18
configuration/rsu.env.example
Normal file
@@ -0,0 +1,18 @@
|
||||
# Copier ce fichier vers /etc/rsu/rsu.env puis remplacer les valeurs d'exemple.
|
||||
SERVER_PORT=8096
|
||||
DB_URL=jdbc:postgresql://localhost:5432/SITE_RSU
|
||||
DB_USERNAME=rsu_app
|
||||
DB_PASSWORD=REMPLACER_PAR_UN_MOT_DE_PASSE_FORT
|
||||
JWT_SECRET=REMPLACER_PAR_LE_RESULTAT_DE_OPENSSL_RAND_BASE64_64
|
||||
UPLOAD_BASE_PATH=/opt/rsu/uploads
|
||||
PUBLIC_SITE_URL=https://rsu.gov.bf
|
||||
CORS_ALLOWED_ORIGINS=https://rsu.gov.bf
|
||||
MAX_FILE_SIZE=20MB
|
||||
MAX_REQUEST_SIZE=25MB
|
||||
HIBERNATE_DDL_AUTO=validate
|
||||
SWAGGER_ENABLED=false
|
||||
|
||||
# Facultatif : publication sur la page Facebook officielle.
|
||||
FACEBOOK_PAGE_ID=
|
||||
FACEBOOK_PAGE_ACCESS_TOKEN=
|
||||
FACEBOOK_GRAPH_API_URL=https://graph.facebook.com/v25.0
|
||||
Reference in New Issue
Block a user