-
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.
- Loading branch information
Sophie
committed
Mar 16, 2023
1 parent
83dc178
commit 7bf386a
Showing
13 changed files
with
109 additions
and
30 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,48 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
gzip on; | ||
gzip_disable "msie6"; | ||
|
||
gzip_vary on; | ||
gzip_proxied any; | ||
gzip_comp_level 6; | ||
gzip_buffers 16 8k; | ||
gzip_http_version 1.1; | ||
gzip_min_length 256; | ||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; | ||
|
||
root /usr/share/nginx/html; | ||
|
||
location / { | ||
try_files $uri /index.html; | ||
add_header Cache-Control "no-store, no-cache, must-revalidate"; | ||
add_header Pragma "no-cache"; | ||
add_header Referrer-Policy origin-when-cross-origin; | ||
add_header X-Frame-Options "SAMEORIGIN"; | ||
add_header X-Content-Type-Options "nosniff"; | ||
add_header X-XSS-Protection "1; mode=block"; | ||
expires -1; | ||
} | ||
|
||
# Media: images, icons, video, audio, HTC | ||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { | ||
expires 1y; | ||
access_log off; | ||
add_header Cache-Control "public"; | ||
} | ||
|
||
# CSS and Javascript | ||
location ~* \.(?:css|js)$ { | ||
expires 1y; | ||
access_log off; | ||
add_header Cache-Control "public"; | ||
} | ||
|
||
# redirect server error pages to the static page /50x.html | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |
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,2 @@ | ||
node_modules | ||
.turbo |
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,17 @@ | ||
FROM node:18.15.0-alpine3.17 AS builder | ||
|
||
RUN apk add --no-cache libc6-compat | ||
|
||
WORKDIR /app | ||
|
||
# First install the dependencies (as they change less often) | ||
COPY . . | ||
RUN npm ci | ||
RUN npx turbo prune --scope=frontend --docker | ||
|
||
# Build the project | ||
RUN npx turbo build --filter=frontend | ||
|
||
FROM nginx:latest | ||
COPY .docker/nginx.conf /etc/nginx/conf.d/default.conf | ||
COPY --from=builder /app/apps/frontend/dist/ /usr/share/nginx/html/ |
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,5 @@ | ||
FROM cypress/included:cypress-12.5.1-node-16.18.1-chrome-110.0.5481.96-1-ff-109.0-edge-110.0.1587.41-1 | ||
COPY /apps/frontend /front/ | ||
WORKDIR /front | ||
RUN npm install esbuild-wasm | ||
ENTRYPOINT npm run test:e2e:docker |
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
version: '3.6' | ||
services: | ||
front: | ||
build: ./ | ||
restart: always | ||
ports: | ||
- '80:80' | ||
cypress: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile-cypress | ||
depends_on: | ||
- front | ||
network_mode: 'host' |