Skip to content

Commit

Permalink
keep port 8080, fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Jun 2, 2024
1 parent dc77994 commit 74f5121
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ jobs:
name: setup Python
with:
python-version: 3.8

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt

- name: Docker Compose up -d --build
working-directory: docker_compose_test
Expand All @@ -25,7 +20,7 @@ jobs:

- name: Check status code /list
run: |
status_code=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:5000/list)
status_code=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8080/list)
if [[ $status_code -ne 200 ]]; then
echo "Request failed with status code $status_code"
exit 1
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Use an official Python runtime as a parent image
FROM python:3.9-slim

EXPOSE 5000
EXPOSE 8080

# define config variables
ENV DOWNLOAD_DIR /app/downloads
Expand All @@ -12,7 +12,7 @@ ENV BROKER_USERNAME "everyone"
ENV BROKER_PASSWORD "everyone"
ENV BROKER_PROTOCOL "websockets"
ENV FLASK_HOST "0.0.0.0"
ENV FLASK_PORT 5000
ENV FLASK_PORT 8080
ENV DOWNLOAD_WORKERS 8
ENV SAVE_LOGS false
ENV LOGS_DIR /app/logs
Expand Down
2 changes: 1 addition & 1 deletion docker_compose_test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ services:
dockerfile: Dockerfile
container_name: wis2-downloader
ports:
- "5000:5000"
- "8080:8080"
2 changes: 1 addition & 1 deletion wis2downloader/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def main():

# Flask options
flask_host = config.get("flask_host", "127.0.0.1")
flask_port = config.get("flask_port", 5000)
flask_port = config.get("flask_port", 8080)

# Finally if the user wants to save the logs to a file
save_logs = config.get("save_logs", False)
Expand Down

0 comments on commit 74f5121

Please sign in to comment.