weso / weso-scholia

Collaboration between Scholia and WESO
GNU General Public License v2.0
3 stars 3 forks source link

Dockerize Scholia #2

Closed thewillyhuman closed 3 years ago

thewillyhuman commented 3 years ago

Add the needed configuration to the repository to add docker support.

thewillyhuman commented 3 years ago

The following docker configuration works if and only if you add a parameter in the app.run(...) indicating the host as 0.0.0.0. Otherwise, the Flask server is only listening to localhost inside the container.

FROM python:latest

WORKDIR /app

COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt

COPY . .

EXPOSE 8100

CMD [ "python3", "runserver.py"]

I will try to fix this be means of environment variables instead of changing the base code.

thewillyhuman commented 3 years ago

At the time the dockerization process relies on adding app.run(debug=True, port=8100, host='0.0.0.0') to the base code.