Skip to content

Commit

Permalink
Reverting; new ideas.
Browse files Browse the repository at this point in the history
Since my network was working properly locally, I'm now thinking that the issue has to do with timing. I don't think the rhodeisland-nominatim container had enough time to setup and wait/listen, which caused the connection to be refused. Changes:

start_integration_tests: removing echoes

dockerfile: reverting to old environment variable

compose: removing version(hopefully this is allowed) and reverting everything except adding condition check. This should cause web-server to wait for the nominatim service to be up and running before trying to connect. We will see!
  • Loading branch information
nataliejschultz committed Aug 22, 2023
1 parent c9135ed commit ccc1c46
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion emission/integrationTests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt-get install -y curl
RUN echo "About to copy e-mission server code"
COPY start_integration_tests.sh/ /start_integration_tests.sh

ENV NOMINATIM_QUERY_URL='nominatim:8080'
ENV NOMINATIM_QUERY_URL='http://rhodeisland-nominatim:8080'

# CMD ["python", "../individual_tests/TestNominatim.py"]
CMD ["/bin/bash", "/start_integration_tests.sh"]
19 changes: 6 additions & 13 deletions emission/integrationTests/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
version: "3"
# version: "3"
services:
web-server:
build:
context: .
depends_on:
- db
- nominatim
- nominatim:
condition: service_healthy
environment:
- DB_HOST=db
- WEB_SERVER_HOST=0.0.0.0
ports:
- "8181:8181"
links:
- nominatim:rhodeisland-nominatim
volumes:
# specify the host directory where the source code should live
# If this is ~/e-mission-server-docker, then you can edit the files at
Expand All @@ -21,7 +18,7 @@ services:
- ../..:/src/e-mission-server
networks:
- emission
- nominatim-network
- nominatim
db:
image: mongo:4.4.0
ports:
Expand Down Expand Up @@ -49,22 +46,18 @@ services:
- IMPORT_WIKIPEDIA=false
ports:
- "8080:8080"

deploy:
replicas: 1
restart_policy:
condition: on-failure
volumes:
- nominatim-data:/var/lib/postgresql/14/main
networks:
- nominatim-network
- nominatim

networks:
emission:
name: emission
nominatim-network:
name: nominatim-network
driver: bridge
nominatim:

volumes:
mongo-data:
Expand Down
4 changes: 0 additions & 4 deletions emission/integrationTests/start_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,16 @@ else
fi
cat conf/storage/db.conf

echo "Python path before setting up conda: $PYTHONPATH"
echo "Setting up conda..."
source setup/setup_conda.sh Linux-x86_64

echo "Python path after setup_conda: $PYTHONPATH"

echo "Setting up the test environment..."
source setup/setup_tests.sh

echo "Python path after setup_tests: $PYTHONPATH"

echo "Running tests..."
source setup/activate_tests.sh
echo "Python path after activate_tests: $PYTHONPATH"

chmod +x runIntegrationTests.sh
# tail -f /dev/null
Expand Down

0 comments on commit ccc1c46

Please sign in to comment.