Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 4 additions & 4 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ restore-backup:

run-backend-e2e:
@DOCKER_BUILDKIT=1 \
docker compose --project-name nest-e2e -f docker-compose/e2e.yaml up --build --remove-orphans --abort-on-container-exit backend db
docker compose --project-name nest-e2e -f docker-compose/e2e/compose.yaml up --build --remove-orphans --abort-on-container-exit backend db

run-backend-fuzz:
@COMPOSE_BAKE=true DOCKER_BUILDKIT=1 \
docker compose --project-name nest-fuzz -f docker-compose/fuzz.yaml up --build --remove-orphans --abort-on-container-exit backend db
docker compose --project-name nest-fuzz -f docker-compose/fuzz/compose.yaml up --build --remove-orphans --abort-on-container-exit backend db

save-backup:
@echo "Saving Nest backup"
Expand Down Expand Up @@ -168,9 +168,9 @@ test-fuzz:
@docker container rm -f fuzz-nest-db >/dev/null 2>&1 || true
@docker volume rm -f nest-fuzz_fuzz-db-data >/dev/null 2>&1 || true
@COMPOSE_BAKE=true DOCKER_BUILDKIT=1 \
docker compose --project-name nest-fuzz -f docker-compose/fuzz.yaml up --build --remove-orphans --abort-on-container-exit db backend data-loader
docker compose --project-name nest-fuzz -f docker-compose/fuzz/compose.yaml up --build --remove-orphans --abort-on-container-exit db backend data-loader
@COMPOSE_BAKE=true DOCKER_BUILDKIT=1 \
docker compose --project-name nest-fuzz -f docker-compose/fuzz.yaml up --build --remove-orphans --abort-on-container-exit db backend graphql
docker compose --project-name nest-fuzz -f docker-compose/fuzz/compose.yaml up --build --remove-orphans --abort-on-container-exit db backend graphql

update-backend-dependencies:
@cd backend && poetry update
Expand Down
10 changes: 5 additions & 5 deletions docker-compose/e2e.yaml → docker-compose/e2e/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ services:
gunicorn wsgi:application --bind 0.0.0.0:9000
'
build:
context: ../backend
context: ../../backend
dockerfile: docker/Dockerfile
depends_on:
db:
condition: service_healthy
env_file: ../backend/.env.e2e.example
env_file: ../../backend/.env.e2e.example
networks:
- e2e-nest-network
ports:
Expand Down Expand Up @@ -40,7 +40,7 @@ services:
POSTGRES_USER: ${DJANGO_DB_USER:-nest_user_e2e}
POSTGRES_DB: ${DJANGO_DB_NAME:-nest_db_e2e}
volumes:
- ../backend/data:/data:ro
- ../../backend/data:/data:ro
networks:
- e2e-nest-network
command: >
Expand Down Expand Up @@ -71,7 +71,7 @@ services:
e2e-tests:
container_name: e2e-nest-tests
build:
context: ../frontend
context: ../../frontend
dockerfile: docker/Dockerfile.e2e.test
command: >
sh -c '
Expand All @@ -80,7 +80,7 @@ services:
depends_on:
backend:
condition: service_healthy
env_file: ../frontend/.env.e2e.example
env_file: ../../frontend/.env.e2e.example
networks:
- e2e-nest-network

Expand Down
10 changes: 5 additions & 5 deletions docker-compose/fuzz.yaml → docker-compose/fuzz/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ services:
gunicorn wsgi:application --bind 0.0.0.0:9500
'
build:
context: ../backend
context: ../../backend
dockerfile: docker/Dockerfile
depends_on:
db:
condition: service_healthy
env_file: ../backend/.env.fuzz.example
env_file: ../../backend/.env.fuzz.example
networks:
- fuzz-nest-network
ports:
Expand Down Expand Up @@ -40,7 +40,7 @@ services:
POSTGRES_USER: ${DJANGO_DB_USER:-nest_user_fuzz}
POSTGRES_DB: ${DJANGO_DB_NAME:-nest_db_fuzz}
volumes:
- ../backend/data:/data:ro
- ../../backend/data:/data:ro
networks:
- fuzz-nest-network
command: >
Expand Down Expand Up @@ -70,15 +70,15 @@ services:
graphql:
container_name: fuzz-nest-graphql
build:
context: ../backend/docker
context: ../../backend/docker
dockerfile: Dockerfile.fuzz
environment:
BASE_URL: http://backend:9500
depends_on:
backend:
condition: service_healthy
volumes:
- ../backend/fuzzing_results:/home/owasp/fuzzing_results
- ../../backend/fuzzing_results:/home/owasp/fuzzing_results
networks:
- fuzz-nest-network

Expand Down
26 changes: 13 additions & 13 deletions docker-compose/local/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:
- 8000:8000
volumes:
- ../../backend:/home/owasp
- backend-venv:/home/owasp/.venv
- backend-venv-e2e:/home/owasp/.venv

cache:
command: >
Expand All @@ -49,7 +49,7 @@ services:
networks:
- nest-network
volumes:
- cache-data:/data
- cache-data-e2e:/data

db:
container_name: nest-db
Expand All @@ -66,7 +66,7 @@ services:
networks:
- nest-network
volumes:
- db-data:/var/lib/postgresql/data
- db-data-e2e:/var/lib/postgresql/data

docs:
container_name: nest-docs
Expand All @@ -83,7 +83,7 @@ services:
- 8001:8001
volumes:
- ../../docs:/home/owasp/docs
- docs-venv:/home/owasp/.venv
- docs-venv-e2e:/home/owasp/.venv

frontend:
container_name: nest-frontend
Expand All @@ -105,8 +105,8 @@ services:
- 3000:3000
volumes:
- ../../frontend:/home/owasp
- frontend-next:/home/owasp/.next
- frontend-node-modules:/home/owasp/node_modules
- frontend-next-e2e:/home/owasp/.next
- frontend-node-modules-e2e:/home/owasp/node_modules

worker:
container_name: nest-worker
Expand Down Expand Up @@ -135,15 +135,15 @@ services:
- nest-network
volumes:
- ../../backend:/home/owasp
- backend-venv:/home/owasp/.venv
- backend-venv-e2e:/home/owasp/.venv

networks:
nest-network:

volumes:
backend-venv:
cache-data:
db-data:
docs-venv:
frontend-next:
frontend-node-modules:
backend-venv-e2e:
cache-data-e2e:
db-data-e2e:
docs-venv-e2e:
frontend-next-e2e:
frontend-node-modules-e2e:
4 changes: 2 additions & 2 deletions frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ test-frontend-e2e:
@docker container rm -f e2e-nest-db >/dev/null 2>&1 || true
@docker volume rm -f nest-e2e_e2e-db-data >/dev/null 2>&1 || true
@DOCKER_BUILDKIT=1 \
docker compose --project-name nest-e2e -f docker-compose/e2e.yaml up --build --remove-orphans --abort-on-container-exit db backend data-loader
docker compose --project-name nest-e2e -f docker-compose/e2e/compose.yaml up --build --remove-orphans --abort-on-container-exit db backend data-loader
@DOCKER_BUILDKIT=1 NEXT_PUBLIC_ENVIRONMENT=local \
docker compose --project-name nest-e2e -f docker-compose/e2e.yaml up --build --remove-orphans --abort-on-container-exit db backend e2e-tests
docker compose --project-name nest-e2e -f docker-compose/e2e/compose.yaml up --build --remove-orphans --abort-on-container-exit db backend e2e-tests


test-frontend-unit:
Expand Down