Skip to content

Commit

Permalink
cypress fix please
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonfarrell committed Oct 18, 2024
1 parent 0041901 commit 88ea7cd
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 80 deletions.
79 changes: 0 additions & 79 deletions containers/ecr-viewer/cypress/docker-compose-cypress.yml

This file was deleted.

32 changes: 32 additions & 0 deletions containers/ecr-viewer/cypress/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
services:
# PostgreSQL database
db:
image: "postgres:alpine"
ports:
- "5432:5432"
volumes:
- ../sql/core.sql:/docker-entrypoint-initdb.d/core.sql
- ../seed-scripts/sql/01-init.sql:/docker-entrypoint-initdb.d/01-init.sql
- ./assets/data.sql:/docker-entrypoint-initdb.d/data.sql
- ../seed-scripts/sql/.pgpass/:/usr/local/lib/.pgpass
environment:
- POSTGRES_USER=postgres
- PGUSER=postgres
- POSTGRES_PASSWORD=pw
- POSTGRES_DB=ecr_viewer_db
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 2s
timeout: 5s
retries: 20

# Next.js app
ecr-viewer:
build:
context: ../../..
dockerfile: ./containers/ecr-viewer/Dockerfile
ports:
- "3000:3000"
environment:
- DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@db:5432/ecr_viewer_db}
- APP_ENV=${APP_ENV:-prod}
2 changes: 1 addition & 1 deletion containers/ecr-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"update-cypress-data": "docker compose -f ./seed-scripts/docker-compose-create-sql.yml up --build --abort-on-container-exit",
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"cypress:run-local": "cp ./cypress/assets/data.sql ./seed-scripts/sql && docker compose --env-file .env.test up db -d && concurrently --kill-others 'npm run dev' 'npx wait-on http://localhost:3000 && NODE_ENV=dev cypress run ; docker compose down && rm ./seed-scripts/sql/data.sql'",
"cypress:run-local": "docker compose -f cypress/docker-compose.yml --env-file .env.test up db -d && concurrently --kill-others 'npm run dev' 'npx wait-on http://localhost:3000 && NODE_ENV=dev cypress run ; docker compose down'",
"cypress:run-prod": "NODE_ENV=production cypress run"
},
"dependencies": {
Expand Down

0 comments on commit 88ea7cd

Please sign in to comment.