Skip to content

Commit

Permalink
Could it be a docker compose network assignment issue?
Browse files Browse the repository at this point in the history
  • Loading branch information
JSv4 committed Jun 17, 2024
1 parent 1323c5f commit d48e856
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,6 @@ jobs:
- name: Collect Static Files
run: docker-compose -f test.yml run --rm django python manage.py collectstatic

# Add the following steps for network inspection and nslookup
- name: Inspect Docker Network
run: |
docker network inspect $(docker-compose -f test.yml ps -q | xargs docker inspect --format='{{range .NetworkSettings.Networks}}{{.NetworkID}}{{end}}' | uniq)
- name: Run nslookup in Django Container
run: |
docker-compose -f test.yml exec django nslookup nlm-ingestor
- name: Build Pytest Coverage File
run: |
docker-compose -f test.yml run django coverage run -m pytest --cov-report=xml --cov
Expand Down
16 changes: 15 additions & 1 deletion test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@ volumes:
local_postgres_data: {}
local_postgres_data_backups: {}

networks:
opencontracts:

services:

nlm-ingestor:
image: jscrudato/nlm-ingestor-opencontracts
container_name: nlm-ingestor
environment:
PORT: 5001
networks:
- opencontracts

vector-embedder:
image: jscrudato/vector-embedder-microservice
container_name: vector-embedder
environment:
PORT: 8000
networks:
- opencontracts

django: &django
build:
Expand All @@ -40,6 +47,8 @@ services:
ports:
- "8000:8000"
command: /start
networks:
- opencontracts

postgres:
build:
Expand All @@ -50,13 +59,16 @@ services:
- local_postgres_data:/var/lib/postgresql/data:Z
- local_postgres_data_backups:/backups:z
- ./compose/production/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql

env_file:
- ./.envs/.test/.postgres
networks:
- opencontracts

redis:
image: redis:6
container_name: redis
networks:
- opencontracts

celeryworker:
<<: *django
Expand All @@ -68,3 +80,5 @@ services:
- nlm-ingestor
ports: []
command: /start-celeryworker
networks:
- opencontracts

0 comments on commit d48e856

Please sign in to comment.