Skip to content

Commit

Permalink
Fix connection after changing backend docker compose to host networking
Browse files Browse the repository at this point in the history
  • Loading branch information
joelvdavies committed Apr 25, 2024
1 parent 7a4a5cf commit 031032c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,23 @@ jobs:
- name: Setup MongoDB
working-directory: ../inventory-management-system-api
run: |
python ./scripts/dev_cli.py --ci db-init --replicaSetMemberHost mongodb_container
python ./scripts/dev_cli.py --ci db-init --replicaSetMemberHost localhost
python ./scripts/dev_cli.py --ci db-import
# Use docker run here to test the actual built image
# Use same network as the MongoDB instance (which is generated by docker compose based on the folder
# name)
- name: Start inventory-management-system-api
run: |
docker run -d -p 8000:8000 --network=inventory-management-system-api_default \
docker run -d --network=host \
--name inventory_management_system_api_container \
--env AUTHENTICATION__ENABLED=false \
--env API__TITLE="Inventory Management System API" \
--env API__DESCRIPTION="This is the API for the Inventory Management System" \
--env DATABASE__PROTOCOL="mongodb" \
--env DATABASE__USERNAME="root" \
--env DATABASE__PASSWORD="example" \
--env DATABASE__HOSTNAME="mongodb_container" \
--env DATABASE__HOSTNAME="localhost" \
--env DATABASE__PORT=27017 \
--env DATABASE__NAME="ims" \
--env API__ALLOWED_CORS_HEADERS='["*"]' \
Expand Down

0 comments on commit 031032c

Please sign in to comment.