-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #246 from SELab-2/testing_environment
fix: production down when tests being run
- Loading branch information
Showing
5 changed files
with
112 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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 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,69 @@ | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
upstream backend { | ||
server test_backend:8080; | ||
} | ||
|
||
upstream frontend { | ||
server test_frontend:5173; | ||
} | ||
|
||
upstream hmr { | ||
server test_frontend:443; | ||
} | ||
|
||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
location / { | ||
return 301 https://$host$request_uri; | ||
} | ||
} | ||
|
||
server { | ||
listen 8080 ssl; | ||
listen [::]:8080 ssl; | ||
|
||
ssl_certificate ssl/certificate.crt; | ||
ssl_certificate_key ssl/private.key; | ||
|
||
location / { | ||
return 301 https://$host$request_uri; | ||
} | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
listen [::]:443 ssl; | ||
|
||
ssl_certificate ssl/certificate.crt; | ||
ssl_certificate_key ssl/private.key; | ||
|
||
location /api/ { | ||
proxy_pass https://backend$request_uri; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $host; | ||
proxy_redirect off; | ||
} | ||
|
||
location /hmr { | ||
proxy_pass http://hmr; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_set_header Host $host; | ||
} | ||
|
||
|
||
location / { | ||
proxy_pass http://frontend; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $host; | ||
proxy_redirect off; | ||
} | ||
} | ||
} |
This file contains 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { defineConfig } from "cypress"; | ||
import { defineConfig } from 'cypress'; | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
baseUrl: "https://nginx", | ||
specPattern: "src/test/e2e/**/*.cy.{js,jsx,ts,tsx}", | ||
baseUrl: 'http://test_nginx', | ||
specPattern: 'src/test/e2e/**/*.cy.{js,jsx,ts,tsx}', | ||
}, | ||
}); |
This file contains 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 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