[DEV] add config
This commit is contained in:
parent
0cc5d1baf6
commit
e8ebc1a558
2
back/.gitignore
vendored
2
back/.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
config.*
|
#config.*
|
||||||
config.env
|
config.env
|
||||||
.env
|
.env
|
||||||
config
|
config
|
||||||
|
@ -6,7 +6,7 @@ RUN apk update && \
|
|||||||
--repository http://dl-cdn.alpinelinux.org/alpine/edge/community \
|
--repository http://dl-cdn.alpinelinux.org/alpine/edge/community \
|
||||||
--repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
|
--repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
|
||||||
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||||
build-base mediainfo
|
build-base mediainfo postgresql-dev gcc python3-dev musl-dev
|
||||||
|
|
||||||
RUN pip3 install --upgrade pip
|
RUN pip3 install --upgrade pip
|
||||||
|
|
||||||
|
23
back/src/config.py
Executable file
23
back/src/config.py
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##
|
||||||
|
## @author Edouard DUPIN
|
||||||
|
##
|
||||||
|
## @copyright 2012, Edouard DUPIN, all right reserved
|
||||||
|
##
|
||||||
|
## @license MPL v2.0 (see license file)
|
||||||
|
##
|
||||||
|
#pip install paho-mqtt --user
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
def get_rest_config():
|
||||||
|
variable = {
|
||||||
|
"tmp_data": "tmp",
|
||||||
|
"data": "data",
|
||||||
|
"data_media": "data/media",
|
||||||
|
"host": os.getenv('REST_HOSTNAME', "0.0.0.0"),
|
||||||
|
"port": int(os.getenv('REST_PORT', 80)),
|
||||||
|
}
|
||||||
|
return variable
|
||||||
|
|
Loading…
Reference in New Issue
Block a user