Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cette PR permet d'avoir un répertoire de publication dans lequel seront déposés les fichiers publiés.
Installation pour un environnement de production
Pour ajouter un répertoire publié par Apache :
/var/www/mviewer/apps/public
) avec les bons droits (e.gwww-data
)/etc/systemctl/system/mviewerstudio.service
MVIEWERSTUDIO_PUBLISH_PATH
pour avoir au final ces 2 variables :Sauvegarder et relancer le serveur
Modifier la configuration du frontend
srv/python/mviewerstudio_backend/static/config.json
Il faut rajouter ce paramètre pour disposer du lien de partage final (voir input ci-dessous)
"mviewer_publish": "https://ma-production/mviewer/?config=",
`
Installation pour un environnement de développement
Ne pas suivre les explications précédentes et passer directement à la partie configuration.
srv/python/mviewerstudio_backend/static/config.json
Ajouter :
"mviewer_publish": "http://localhost:5051/?config=",
/srv/python/mviewerstudio_backend/settings.py
Il faut rajouter l'emplacement du répertoire de publication via ce paramètre en s'assurant que flask peut écrire dans ce répertoire avec les bons droits :
MVIEWERSTUDIO_PUBLISH_PATH = os.getenv("MVIEWERSTUDIO_PUBLISH_PATH", "public")
... ou comme variable d'environnement :
export MVIEWERSTUDIO_PUBLISH_PATH = '/mviewerstudio_backend/public'
RAF