diff --git a/docker-compose.yml b/docker-compose.yml index fcea765..9cf7e12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,4 +3,4 @@ services: web: build: . ports: - - "8080:8080" + - "8170:8170" diff --git a/dockerfile b/dockerfile index 684950e..a65861f 100644 --- a/dockerfile +++ b/dockerfile @@ -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"] diff --git a/htt.conf b/htt.conf index cb9307e..3cba2b7 100644 --- a/htt.conf +++ b/htt.conf @@ -1,3 +1,4 @@ [DEFAULT] cleartime = 10 -domain = localhost:8080 \ No newline at end of file +domain = localhost:8080 +port = 8170 \ No newline at end of file diff --git a/start.py b/start.py index 22a0dc8..44fe7ed 100644 --- a/start.py +++ b/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)