-
-
Notifications
You must be signed in to change notification settings - Fork 2
Docker cypress #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Docker cypress #175
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Dependencies | ||
| node_modules | ||
| **/node_modules | ||
|
|
||
| # Build outputs | ||
| dist | ||
| build | ||
| *.log | ||
|
|
||
| # Git | ||
| .git | ||
| .gitignore | ||
|
|
||
| # IDE | ||
| .vscode | ||
| .idea | ||
| *.swp | ||
| *.swo | ||
|
|
||
| # OS | ||
| .DS_Store | ||
| Thumbs.db | ||
|
|
||
| # Test coverage | ||
| coverage | ||
| .nyc_output | ||
|
|
||
| # Cypress | ||
| cypress/videos | ||
| cypress/screenshots | ||
|
|
||
| # Environment files | ||
| .env | ||
| .env.local | ||
| .env.*.local | ||
|
|
||
| # Temporary files | ||
| tmp | ||
| temp | ||
| *.tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Dependencies | ||
| node_modules | ||
| **/node_modules | ||
|
|
||
| # Build outputs | ||
| dist | ||
| build | ||
| *.log | ||
|
|
||
| # Git | ||
| .git | ||
| .gitignore | ||
|
|
||
| # IDE | ||
| .vscode | ||
| .idea | ||
| *.swp | ||
| *.swo | ||
|
|
||
| # OS | ||
| .DS_Store | ||
| Thumbs.db | ||
|
|
||
| # Test coverage | ||
| coverage | ||
| .nyc_output | ||
|
|
||
| # Cypress | ||
| cypress/videos | ||
| cypress/screenshots | ||
|
|
||
| # Environment files | ||
| .env | ||
| .env.local | ||
| .env.*.local | ||
|
|
||
| # Temporary files | ||
| tmp | ||
| temp | ||
| *.tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| FROM node:22.19.0 | ||
gtryus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # Install wget for healthcheck | ||
| RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Copy root package files first | ||
gtryus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| COPY package*.json ./ | ||
|
|
||
| # Install root dependencies (use ci for clean install, ignore cache) | ||
| RUN npm ci | ||
|
|
||
| # These lines appear to cause the container build to hang | ||
| # # Create a non-root user for running the application | ||
| # RUN groupadd --gid 1010 apm \ | ||
| # && useradd --uid 1010 --gid apm --shell /bin/bash --create-home apm | ||
| # # Change ownership of the app directory to the apm user | ||
| # RUN chown -R apm:apm /app | ||
| # # Switch to the non-root user | ||
| # USER apm | ||
|
|
||
| # Copy renderer package files | ||
| COPY src/renderer/package*.json ./src/renderer/ | ||
|
|
||
| # Install renderer dependencies (use ci for clean install, ignore cache) | ||
| RUN cd src/renderer && npm ci | ||
|
|
||
| # Copy necessary config files | ||
| COPY env-config ./env-config | ||
| COPY tsconfig*.json ./ | ||
| COPY electron.vite.config.ts ./ | ||
| COPY src/renderer ./src/renderer | ||
|
|
||
| # Expose Vite dev server port | ||
| EXPOSE 3000 | ||
|
|
||
| # The command will be overridden by docker-compose | ||
| CMD ["npm", "start"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| FROM cypress/included:15.7.1 | ||
|
|
||
| # Install curl for warming up Vite | ||
| RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| WORKDIR /e2e | ||
|
|
||
| # Copy package files | ||
| COPY package*.json ./ | ||
|
|
||
| # Install project dependencies (including vite-dev-server, etc.) | ||
| RUN npm ci | ||
|
|
||
| # The rest will be mounted via volumes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| version: '3.8' | ||
|
|
||
| services: | ||
| # Vite development server | ||
| app: | ||
| build: | ||
| context: ../.. | ||
| dockerfile: src/renderer/Dockerfile | ||
| ports: | ||
| - '3000:3000' | ||
| volumes: | ||
| - ../..:/app | ||
| - /app/node_modules | ||
| - /app/src/renderer/node_modules | ||
| environment: | ||
| - NODE_ENV=development | ||
| command: sh -c "set -e; cd /app && npm run stamp && npm run devs && cd /app/src/renderer && npm start" | ||
| healthcheck: | ||
| test: | ||
| [ | ||
| 'CMD', | ||
| 'wget', | ||
| '--no-verbose', | ||
| '--tries=1', | ||
| '--spider', | ||
| 'http://localhost:3000', | ||
| ] | ||
| interval: 3s | ||
| timeout: 5s | ||
| retries: 20 | ||
| start_period: 40s | ||
| networks: | ||
| - cypress-net | ||
|
|
||
| # Cypress tests | ||
| cypress: | ||
| build: | ||
| context: . | ||
| dockerfile: Dockerfile.cypress | ||
| depends_on: | ||
| app: | ||
| condition: service_healthy | ||
| environment: | ||
| - CYPRESS_baseUrl=http://app:3000 | ||
| working_dir: /e2e | ||
| volumes: | ||
| - .:/e2e | ||
| - /e2e/node_modules | ||
| command: > | ||
gtryus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| docker run | ||
| --component | ||
| --config-file cypress/config/local.config.ts | ||
| networks: | ||
| - cypress-net | ||
|
|
||
| networks: | ||
| cypress-net: | ||
| driver: bridge | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.