diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..f17cd43 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +.idea +__pycache__ +.git +.dockerignore +Dockerfile +*.md +db.json +users.json +test.py +update_db.py +logs +*.log +.vscode +uploads/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..056a153 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.9.5 +WORKDIR /app +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt +COPY . . +COPY container/* . +RUN mkdir -p /app/uploads +EXPOSE 3133 + +CMD ["python", "app.py"] \ No newline at end of file diff --git a/app.py b/app.py index d75183d..a053b61 100644 --- a/app.py +++ b/app.py @@ -330,4 +330,4 @@ def download(code): flash('Invalid code! Check if you typed the correct code, and for one-time codes, make sure nobody else entered the code before you did.', 'error') return redirect(url_for('upload')) -app.run(debug=True, port=3133) +app.run(debug=True, port=3133, host='0.0.0.0')