added port config
This commit is contained in:
parent
ac25dc6c1a
commit
b8c3d18a24
@ -3,4 +3,4 @@ services:
|
|||||||
web:
|
web:
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8170:8170"
|
||||||
|
@ -10,7 +10,7 @@ RUN pip install cherrypy
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Make port 8080 available to the world outside this container
|
# Make port 8080 available to the world outside this container
|
||||||
EXPOSE 8080
|
EXPOSE 8170
|
||||||
|
|
||||||
# Run app.py when the container launches
|
# Run app.py when the container launches
|
||||||
CMD ["python", "start.py"]
|
CMD ["python", "start.py"]
|
||||||
|
1
htt.conf
1
htt.conf
@ -1,3 +1,4 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
cleartime = 10
|
cleartime = 10
|
||||||
domain = localhost:8080
|
domain = localhost:8080
|
||||||
|
port = 8170
|
6
start.py
6
start.py
@ -9,6 +9,7 @@ config = configparser.ConfigParser()
|
|||||||
config.read('htt.conf')
|
config.read('htt.conf')
|
||||||
domain = str(config['DEFAULT']['domain'])
|
domain = str(config['DEFAULT']['domain'])
|
||||||
MAINTENANCE_INTERVAL_MINUTES = float(config['DEFAULT']['cleartime'])
|
MAINTENANCE_INTERVAL_MINUTES = float(config['DEFAULT']['cleartime'])
|
||||||
|
port = float(config['DEFAULT']['port'])
|
||||||
|
|
||||||
def popup(mesage,link="",file="popup.html"):
|
def popup(mesage,link="",file="popup.html"):
|
||||||
out = load(file)
|
out = load(file)
|
||||||
@ -118,5 +119,10 @@ if __name__ == "__main__":
|
|||||||
"tools.staticdir.dir": os.path.abspath("uploads"),
|
"tools.staticdir.dir": os.path.abspath("uploads"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cherrypy.config.update({
|
||||||
|
'server.socket_host': '0.0.0.0', # Bind to all available network interfaces
|
||||||
|
'server.socket_port': port,
|
||||||
|
'log.screen': True,
|
||||||
|
})
|
||||||
|
|
||||||
cherrypy.quickstart(FileUploadApp(), "/", config)
|
cherrypy.quickstart(FileUploadApp(), "/", config)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user