Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
C
carte-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
carte-facil
Validations
4c8b6f79
Valider
4c8b6f79
rédigé
il y a 7 ans
par
Yohan Boniface
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Fallback looking for settings file at /etc/umap/umap.conf
fix #487
parent
e29ead1f
Aucune branche associée trouvée
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
2
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
docs/ubuntu.md
+8
-11
8 ajouts, 11 suppressions
docs/ubuntu.md
umap/settings/__init__.py
+26
-20
26 ajouts, 20 suppressions
umap/settings/__init__.py
avec
34 ajouts
et
31 suppressions
docs/ubuntu.md
+
8
−
11
Voir le fichier @
4c8b6f79
...
...
@@ -12,9 +12,10 @@ You need sudo grants on this server, and it must be connected to Internet.
*Note: uMap also works with python 2.7 and 3.4, so adapt the package names if you work with another version.*
## Create
a
deployment director
y
:
## Create deployment director
ies
:
sudo mkdir -p /srv/umap
sudo mkdir -p /etc/umap
*You can change this path, but then remember to adapt the other steps accordingly.*
...
...
@@ -27,6 +28,11 @@ You need sudo grants on this server, and it must be connected to Internet.
on the various commands and configuration files if you go with your own.
*
## Give umap user access to the config folder
sudo chown umap:users /etc/umap
## Create a postgresql user
sudo -u postgres createuser umap
...
...
@@ -65,15 +71,8 @@ you will need to run again this last line.*
## Create a local configuration file
wget https://raw.githubusercontent.com/umap-project/umap/master/umap/settings/local.py.sample -O /srv/umap/local.py
Now we need to inform umap about it.
We'll create an environment variable for that:
export UMAP_SETTINGS=/srv/umap/local.py
wget https://raw.githubusercontent.com/umap-project/umap/master/umap/settings/local.py.sample -O /etc/umap/umap.conf
*
Note: this variable will not be persistent if you quit your current terminal session, so
remember to rerun this command if you open a new terminal window.
*
## Create the tables
...
...
@@ -147,8 +146,6 @@ chdir = /srv/umap/
module = umap.wsgi
# the virtualenv (full path)
home = /srv/umap/venv
# the local settings path
env = UMAP_SETTINGS=/srv/umap/local.py
# process-related settings
# master
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
umap/settings/__init__.py
+
26
−
20
Voir le fichier @
4c8b6f79
...
...
@@ -9,24 +9,30 @@ from .base import * # NOQA, default values
# Allow to override setting from any file, may be out of the PYTHONPATH,
# to make it easier for non python people.
path
=
os
.
environ
.
get
(
'
UMAP_SETTINGS
'
)
if
path
:
d
=
imp
.
new_module
(
'
config
'
)
d
.
__file__
=
path
try
:
with
open
(
path
)
as
config_file
:
exec
(
compile
(
config_file
.
read
(),
path
,
'
exec
'
),
d
.
__dict__
)
except
IOError
as
e
:
msg
=
'
Unable to import {} from UMAP_SETTINGS
'
.
format
(
path
)
print
(
colorize
(
msg
,
fg
=
'
red
'
))
sys
.
exit
(
e
)
else
:
print
(
'
Loaded local config from
'
,
path
)
for
key
in
dir
(
d
):
if
key
.
isupper
():
globals
()[
key
]
=
getattr
(
d
,
key
)
else
:
if
not
path
:
# Retrocompat
try
:
from
.local
import
*
# NOQA
except
ImportError
:
pass
path
=
os
.
path
.
join
(
'
/etc
'
,
'
umap
'
,
'
umap.conf
'
)
if
not
os
.
path
.
exists
(
path
):
# Retrocompat
path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
'
local.py
'
)
if
not
os
.
path
.
exists
(
path
):
msg
=
(
'
You must configure UMAP_SETTINGS or define
'
'
/etc/umap/umap.conf
'
)
print
(
colorize
(
msg
,
fg
=
'
red
'
))
sys
.
exit
(
1
)
d
=
imp
.
new_module
(
'
config
'
)
d
.
__file__
=
path
try
:
with
open
(
path
)
as
config_file
:
exec
(
compile
(
config_file
.
read
(),
path
,
'
exec
'
),
d
.
__dict__
)
except
IOError
as
e
:
msg
=
'
Unable to import {} from UMAP_SETTINGS
'
.
format
(
path
)
print
(
colorize
(
msg
,
fg
=
'
red
'
))
sys
.
exit
(
e
)
else
:
print
(
'
Loaded local config from
'
,
path
)
for
key
in
dir
(
d
):
if
key
.
isupper
():
globals
()[
key
]
=
getattr
(
d
,
key
)
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter