Skip to content

Commit 3376a65

Browse files
committed
Update CI/CD and dockerfile
1 parent f1b0af0 commit 3376a65

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

.github/workflows/setup-e2e-environment/action.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
- name: Set up E2E environment
2-
runs:
1+
name: Set up E2E environment
2+
description: "Sets up the environment for end-to-end testing."
3+
4+
runs:
35
using: "composite"
46
steps:
57
- name: Wait for database to be ready

backend/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ restore-backup:
114114

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

119119
save-backup:
120120
@echo "Saving Nest backup"

backend/docker/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,5 @@ RUN rm -rf /home/owasp/.cache && \
6363
chmod +x /home/owasp/entrypoint.sh
6464

6565
USER owasp
66+
67+
EXPOSE 8000

docker-compose/backend.e2e.yaml renamed to docker-compose/e2e.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ services:
2424
ports:
2525
- 8000:8000
2626
healthcheck:
27-
interval: 5s
28-
retries: 5
27+
interval: 10s
28+
retries: 10
2929
test: >
3030
sh -c '
31-
wget --spider --timeout=1 http://localhost:8000/graphql/ || exit 1
31+
wget --spider http://backend:8000/graphql
3232
'
33-
timeout: 5s
33+
timeout: 10s
34+
start_period: 10s
3435
db:
3536
container_name: nest-db-e2e
3637
image: pgvector/pgvector:pg16

0 commit comments

Comments
 (0)