Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing docker configurations #80

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ modules.xml
app_test
django_project
manage.py
Dockerfile
start.sh
wait-for-it.sh
test*xml
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.9-slim-buster

ENV PYTHONUNBUFFERED=1

RUN apt-get update && \
apt-get install -y git

WORKDIR /app
COPY . .

RUN pip install --upgrade pip && \
pip install poetry && \
poetry export -f requirements.txt -o requirements.txt --with dev && \
pip uninstall --yes poetry && \
pip install --no-cache-dir --upgrade --upgrade-strategy=eager -r requirements.txt
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ services:
integration-tests-tox:
build:
context: .
dockerfile: Dockerfile.tox-tests
volumes:
- .:/app
depends_on:
Expand Down Expand Up @@ -72,7 +71,7 @@ services:
broker-rabbitmq:
image: rabbitmq:3-management
ports:
- 61613:61613
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Port 61613 is used inside the code. The pipeline probably broke because of this. Do you really need to change the port?
The idea would be to start one container at a time and not both at the same time.
Did this configuration work locally?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started all the services at the same time (using docker compose up [--build]), hence the reason it was reporting a port already in use error. I can:

  1. revert the change and leave clear guidelines on the README about how to run the tests in docker compose setup, OR
  2. change the rabbitmq port in the code to support both cases.

I am not sure how detrimental the 2nd option will be, but a person new to the repo like I am will expect it not to fail if they ran the same command.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's this section that says to run the tests with either broker-activemq or broker-rabbitmq. If it's not clear enough, it's an opportunity to improve it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's this section that says to run the tests with either broker-activemq or broker-rabbitmq. If it's not clear enough, it's an opportunity to improve it

I'll have a closer look at how to better approach this, then update ASAP.

- 61615:61613
- 15672:15672
volumes:
- ./tests/resources/custom-rabbitmq-conf:/etc/rabbitmq/
Expand Down
Loading