added port config
This commit is contained in:
parent
ac25dc6c1a
commit
b8c3d18a24
@ -3,4 +3,4 @@ services:
|
||||
web:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "8170:8170"
|
||||
|
@ -10,7 +10,7 @@ RUN pip install cherrypy
|
||||
COPY . .
|
||||
|
||||
# Make port 8080 available to the world outside this container
|
||||
EXPOSE 8080
|
||||
EXPOSE 8170
|
||||
|
||||
# Run app.py when the container launches
|
||||
CMD ["python", "start.py"]
|
||||
|
6
start.py
6
start.py
@ -9,6 +9,7 @@ config = configparser.ConfigParser()
|
||||
config.read('htt.conf')
|
||||
domain = str(config['DEFAULT']['domain'])
|
||||
MAINTENANCE_INTERVAL_MINUTES = float(config['DEFAULT']['cleartime'])
|
||||
port = float(config['DEFAULT']['port'])
|
||||
|
||||
def popup(mesage,link="",file="popup.html"):
|
||||
out = load(file)
|
||||
@ -118,5 +119,10 @@ if __name__ == "__main__":
|
||||
"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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user