Skip to content

Commit

Permalink
Landing website for 2023 (#270)
Browse files Browse the repository at this point in the history
* fix: dereferenced partnership files

* Teasing 2023 (#258)

* added legal links

* feat: code cleaning and some style

* added partners

* converted Slider.tsx to Slider.jsx + fixed 4 spaces tabulations

* feat: add many components for main page and add style for existing ones

* fix: uncomment required code

* added top of tournament list

* started adding tournament list

* buttons are now a little better

* added tournaments list

* feat: start implementation of TypeScript

* fix: bugs

* feat: implement Storybook as doc

* feat: add storybook preview

* feat: change from yarn to pnpm

* fix: improve doc and types

* fix: improve Typescript support and add documentation

* feat: add more components to TypeScript

* fix: types

* lint: fixed (more or less i guess) linting + linted

+ added back webstorm to .gitignore

* finished component conversion to ts

* excluded pnpm-lock from git

* feat: push some modifs

* feat: add even more documentation

* fix: error

* fix: add client ...

* fix: add back defaultProps

* fix: some errors

* fix: defaultProps and types

* feat: final Typescript import (still errors to correct)

* feat: final Typescript import (still errors to correct)

* fix: lint

* fix: remove some any

* added a first test

* added tests for button

* feat: add some style, fix some bugs and add social icons

* feat: implement help page

* feat: improve responsive and add burger menu

* feat: add burger menu content

* fix: reducers and burger menu

* feat: add content for the main menu

* added parallax component

this took way longer than it should have

* updated parallax a little

* added tournament information page

* lint

* fix: issues

* fix: add right favicon for 2023

* fix: ci

* Added background clouds and constellations to tournament info page

* fix: favicon

* feat: start about page

* fix: lint

* fix: lint

* tried removing white part before the footer

didn't go that well

* fix: improve design

* Removed old parallax and added a wayyyyy better one

* changed the parallax to allow to make it smoother

* Added event page

* Fixed bugs in the AppearFromSide effect

* the elements were not being detected if they were too much to the left or the right
* the elements spawned at the middle and so there could be a strange animation at the beginning. now it's less likely to happen (but still possible for some reason I don't want to dive into)

* Finished event page

* added some responsive to the event page

* centered links in footer when on small screen

* fixed a bug + type-ed in AppearFromSide

* when user changed page from a page that had this animation, there could be an nullpointerexception
* added types for the definition of the component

* finished page tournament

* added partners
* centered the title text

* Added a little animation in the FAQ

* feat: improve design

* fix: typescript

* fix: even more design

* fix: scrolling behavior

* Updated responsive for the home page

* finished responsive for page event

* feat: add more responsive

* feat: add final responsive

* feat: improve tournaments (1/2)

* smoother transition between tournaments

* updated the go back button on the tournament page

* Added component DoubleImage

* fix: minor design change

* text now fades out when changing the selected tournament

* linted basically everything

* fix: background of the game was not shown when page loaded

* fixed a problem with the animation of the text when switching tournament

* fix: typescript

* transition between the tournaments page and the tournament info page

there are still a lot of fixes that can be done

* fix: some issues

* fix: style

* fix: many errors

* fix: pages cannot take parameters

* fix: build

* feat: new form

* feat: new Table

* added animation when going back to tournaments list

* the transition is now wayy better

* better distribution of constellations

* fix: new button

* added line under the place we are in the navbar

* removed a console.log

* apparently our code is too fast, so we had to slow it down a bit :)

* fix: problems

* now a shading effect is applied when arriving on page /tournaments

* feat: add double image animation

* fix: add Slider 3

* fix: button style

* fix: responsive

* fix: lint

* feat: push new styles for responsive

* fixed legal with small screen

* fixed title 2 with border for small screen, and removed fix for legal as this fixes legal too, but way better than previouusly

* fix: lint

* fix: responsive

* fix: style

* fix: title style

* fix: small bug

* feat: add some content and satart importation of old things (dashboard)

* feat: improve design and add page navigation for the tournaments

* fix: build

* feat: add most of old pages and convert them to Typescript and the new Redux system

* feat: add all the files for dashboard and admin

* fix: lint

* feat: update structure and add final dashboard pages

* feat: add csp + keyboard shortcuts

* fix: docs and csp

* fix: lint

* fix: add better redirect, remove some unused dependencies and improve design

* fix: lint

* fix: csp

* feat: add even more documentation

* fix: bug

* feat: remove some hrdcode and replace by the new API routes

* fix: lint

* fix: add some tournaments types and fix robots.txt

* feat: fix Login and Register

* Fixed tournament pages

* tournaments are now fetched correctly from the api
* there is now a table at the bottom of a tournament information to show the locked teams
* field locked of interface Team has been renamed to lockedAt to match the naming in the db

* fix: redux and add new admin login page

* feat: add more api information and fix tournaments

* fix: partners

* added scroll when clicking on the "Découvrir les tournois" button

it only kinda works. on the page /tournaments/{id}, it doesn't work at all. investigation is needed, or, to be more precise, incantations

* fix: table and layout

* feat: add settings admin panel

* Button "Découvrir les tournois" now fully works + fixed bug

Fixed a bug where the tournaments would sometimes not be displayed

* button "se connecter" now works in pages tournaments/*

* wrong images were displayed in the list of tournaments

* Selected button in the header is now a bit better

* better transition between tournament selection

* "A propos" and "Connexion" buttons were moving when login modal was opened

* feat: add tournament editor

* fix: lint

* fix: lint

* fix: no shortName

* fix: Card & build

* fix: copyright and add delete partner

* feat: add User creation

* feat: add rules to tournaments page

* remove Countdown and lint

* Title of the tournament was hidden in /tournaments/{id}

* removed countdown from styles.scss

* fixed background for 4k screens

* move copyright

* now copyright has the ability to turn :)

* fix crop icon

* circlelify stroke

* added firework when the copyright is turned

* feat: add casters input

* fix: lint and improve style

* feat: add some documentation

* feat: add even more doc and fix the current doc

* fix: storybook build

* removed padding of the copyright + added credits for the fireworks

* added scrolling parallax effect

* added component ScrollingParallax. this is laggy
* added images for the parallax scrolling
* react was running in strict mode
* linted

* feat add little doc

* update navbar in PanelHeader

* ScrollingParallax is now more optimized

* oopsy

* optimized scrolling a little by adding a small transition

* renamed a class name which could be confused with another one

* updated ScrollingParallax to make it less laggy

* fixed AppearFromSide component

+ removed a console.log in the Parallax component

* nice parallaxes on home page <3

* AppearFromSide didn't work when the child was a function component

* Removed unused parameter from AppearFromSide + readded smoothness

* fix: lint and build

* it's an admin page but it's better

* optilmized the AppearFromSide component

(+ i style was not applied)

* made header sticky

* bro that header transition is sick

* made the header animation start faster

* fix: some styles and bugs

* slider on home page is now in front of the parallax elements

* Parallax component style is now a module

* modulified Header

* continuing to modularize

* modulariiiiiiizee !

* some more pages

* fix: lint

* feat: add design to admin menu

* fix: lint and build

* fix: icons

* fix: small fixes

* fix: blob

* fix: filename to fix a bug with the tiny file manager

* satisfying animation on opening/closing a modal

* modularizing is moving on

* fixed pagination display on the table of the admin/users page

* fixed a small bug when closing the LoginModal on the reset password menu

* fix: push some fix for the SEO

* modularization + removed junk from global.scss

* finished modularizing (didn't test everything tho 👀)

* fixed bugs

* stroke mixins was too laggy. it's now a component (TextStroke)

* Fixed other stroke mixin usages

* "fixed" bug on page /tournaments

* fixed css for title of a tournament

* fix: Title (and Teddy is annoying)

* fixed some CSS imports and linted

* fix: remove Salon jeux which does not exist anymore

* Fixed boxes in /tournaments/{id}

* fixed label colors in Modal

* the box container on the home page is now centered again

* fixed radio buttons

* implemented basic badge creation

* Added some docs + removed unused file

* fix

* fixed building

* Changed most of imports to absolute imports

* feat: added tournaments list at the bottom of home page

* changed file name of some files in the uploadLink.ts

* fix: restored autosliding to false on the slider of home page

* feat: added animations for the tournament slider

* remade html structure : each of the 3 cards has a hardcoded (relative) position

* tournmaents are now looooooopingggggg

* removed debugs

* TournamentsList now mostly works

yes, that's the third commit that remakes it :(

* home page is now a server component

* fix: some modularization errors

* in the tournaments/ page
* in the Title component

* style: replaced a little the background elements of /tournaments page

* there is still work to be done

* fix: small bugs on the TournamentList components

* turned back on the autoslide
* (temporarily) removed media queries for mobile (there are bugs with them)
* removed a console.log
* re-added a normal delay before snapping (from 1000 to 200ms)
* fixed a small bug where the snapping would not occur on the left

* lint: builds

* fix: text 2023

* fix: back button

* Made TournamentList more flexible and bigger

* style : styled the tournament list part of the home page

* also added a redirection when clicking on the buttons of the tournament list cards
* replaced csgo background placeholder by the correct image (which don't exist at the moment 👀)

* docs: added docs to the TournamentList component

* update: dependencies

* and linted

* TournamentList is now better looking

* TournamentList is now even better

* style: responsive

* readded responsiveness for the burger icon
* added responsiveness for the tournaments list

* fix: build is now possible

* lint: removed a console.log

* fix: text + tournaments

* added a placeholder lorem ipsum where the text of the tournaments section will be
* updated responsivity of the tournaments scroller

* small fix in the responsiveness of the data flexing part (home page)

* styles: fixed a lot of style in the responsivity departement

---------

Co-authored-by: Teddy Roncin <[email protected]>
Co-authored-by: ploine <[email protected]>

* fix: build (#260)

* fix: middleware

* fix: dockerfile build to pnpm start instead of standalone

* fix: dockerfile

* fix: build

* fix: remove unused lines of code in Dockerfile

* fix: dockerfile npm not working

* fix: back to old Dockerfile because okd can't support it

* fix: pnpm-lock

* Fix/tournament list (#261)

* Added messages when tournaments are loading and when there are none

* fix: add back old options of build

* style: added style to the card

* lint

* fix: tournament modal

* fix: admin/tournaments page was crashing when clicking on tournament

* style: fixed background color of square component

* style: made partners images a little bigger

---------

Co-authored-by: Noé Landré <[email protected]>

* Created a template for pull request

* Fixes (#262)

* fix: removed scrollbar in all browsers in the TournamentList component

* fix: fix some styles issues

* fix: length of a set of cards in the TournamentList was not computed well

* fix: add padding to tournaments

* style: added some padding to the text on the left of the TournamentList

* fix: better text style for TournamentList

* fix: background on tournaments/* pages was doing cringy things

* fix: texts

* fix: padding style

---------

Co-authored-by: Noé Landré <[email protected]>

* fix: tournaments arrows (#264)

* fix: tournaments arrows

* fix: contents

* Fix/lasts (#265)

* fix: ids now have clean names

for reference in the scss file, a class (with the same name) has been created for each component with an id

* build: linted

* style: removed the underline in the header on the selected page

* fix: the bottom of a cloud was cut in the /tournaments page

* style: improved FAQ style

* style: table is now a little more lightened

* style: UA icon is now less compressed when header is reduced

* fix: last changes

* aligned main title in /event page
* commented out table in the /event page
* added texts

* build: linted

* Fix/reported bugs (#266)

* fix: iframe doesn't load because of CSP. It may now be fixed

* fix: header was doing breakdance when scrolling a little bit

* fix: the register button on the slides of the home page now opens the login modal

* fix: scroll button was not working properly on page /tournaments

* fix: it's not possible to copy the link of an faq question from mobile anymore

* fix: h3 had style of h1 in the /legal page

* fix: article 12's title had same style as h1

* fix: link to ids on help page has been fixed

* on loading page, the header is now in the scrolled state
* added a little scroll-margin-top to the links
* objects are now scrolled to their beginning instead of their center

* feat: "troyes" and "1, 2, 3 décembre 2023" are now clickable on home page

* typo: changed orthograph from "événement" to évènement"

* typos

* fix: z-index between parallax and tournament list

* style: fixed responsive of tournament list

* fix: scrollbar was still displayed in some browsers

* content: fixed a lot of texts, informations, images, ...

* content: changed UA address, changed wording, changed "équipe" to "joueur" for tournaments of 1 player

* build

* content: changed "8 jeux" to "8 tournois" in the counters part (in home page)

* Fix/reported bugs rest (#268)

* fix: the copy link button on the collapse element isn't a super secret feature anymore

* typo : fixed typos in the location of the event

* content: removed program part in /event

* added a toast when the user clicks on the link that should redirect to this part on the home page

* fix: twitter + typo

* fix: image stretching in footer

* fix: counter

* fix: image selection

* typo: added a comma in the address name :)

* fix: Counter definition + lint

* fix: /tournaments scroll landing is no longer strange

* added a component ScrollUp

* refactor: tournaments/layout.tsx is now built server side, and a new component has been added for the top container

* lint

* fix: cashprizeDetails

* fix: changed the tournament box in /tournaments/{id}

* also rewording in faq

* content: commented out rules button in /tournaments/{id} for now

* style: updated background image

* style: changed images for UNG in /about

* fix: scroll button in /tournaments

* also fixed a className that was hardcoded in the tournaments/content.tsx

* fix: z-index between content and parallax in home page

* legal: changed content

* replaced the person responsible for data treatment
* commented out the CGV part

* style: centered and biggered text in boxes in /tournaments/{id}

* lint

---------

Co-authored-by: Noé Landré <[email protected]>
Co-authored-by: Teddy Roncin <[email protected]>

* style: changed style of the UTT ARENA text in the first slide of the slider of the home page

* Design (#269)

* feat: add better design

* fix: chevron design

* revert last test

* fix: clouds were passing on top of tournament icons during fading on route /tournaments

* fix: clouds

* fix: lint

* fix: lint

---------

Co-authored-by: Teddy Roncin <[email protected]>

* Style/error pages (#267)

* style: page 404 is now wayy cooler

* espace avant "ERREUR 404"
et micro-changements sur le message

* Page erreur

* new clean copy function and a nice grass green

* comments

* fix: changed id reference to class reference in scss file

* fix : class reference in error.tsx

* nitty gritty thingys

* renamed not-found.module.scss to errors.module.scss
* removed a commented code
* reworded text in error.tsx
* added error stack to clipboard
* reformated the .grass selector in errors.module.scss

---------

Co-authored-by: Teddy Roncin <[email protected]>
Co-authored-by: Leo Cholvy <[email protected]>
Co-authored-by: Teddy Roncin <[email protected]>

---------

Co-authored-by: Lucien Charleux <[email protected]>
Co-authored-by: Noé Landré <[email protected]>
Co-authored-by: ploine <[email protected]>
Co-authored-by: Noé Landré <[email protected]>
Co-authored-by: Teddy Roncin <[email protected]>
Co-authored-by: LeoCholvy <[email protected]>
Co-authored-by: Leo Cholvy <[email protected]>
  • Loading branch information
8 people authored Oct 5, 2023
1 parent c8459f7 commit 9d43062
Show file tree
Hide file tree
Showing 419 changed files with 28,583 additions and 13,297 deletions.
34 changes: 17 additions & 17 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
.git/
Dockerfile

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules

# next.js
/.next/

# production
/build

# misc
.DS_Store
.env
.git/
Dockerfile

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules

# next.js
/.next/

# production
/build

# misc
.DS_Store
.env
24 changes: 12 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
# Unix-style newlines
end_of_line = lf
insert_final_newline = false
charset = utf-8
indent_style = space
indent_size = 2
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
# Unix-style newlines
end_of_line = lf
insert_final_newline = false
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NEXT_PUBLIC_API_URL=http://localhost:3000
# Uploads URL
# (by default the production directory but you can change it to "http://localhost:8080/uploads/files"
# to match with your own /public/uploads/files directory)
NEXT_PUBLIC_UPLOADS_URL=https://arena.utt.fr/uploads/files
NEXT_PUBLIC_UPLOADS_URL=https://arena.dev.uttnetgroup.fr/uploads/files

# Google credentials
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=
Expand Down
33 changes: 25 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@
"plugin:import/warnings",
"plugin:import/react",
"eslint:recommended",
"next",
"prettier"
"next/core-web-vitals",
"prettier",
"plugin:storybook/recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": ["react-hooks", "react", "prettier"],
"parser": "@typescript-eslint/parser",
"plugins": [
"react",
"prettier",
"@typescript-eslint"
],
"root": true,
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
Expand All @@ -25,20 +33,29 @@
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx"]
"extensions": [
".js",
".jsx"
]
}
}
},
"rules": {
"prettier/prettier": ["error"],
"no-console": "error",
"prettier/prettier": [
"error"
],
"no-console": "off",
"no-alert": "error",
"linebreak-style": ["warn", "unix"],
"react/require-default-props": "error",
"linebreak-style": [
"warn",
"unix"
],
"react/require-default-props": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "off",
"react/no-unescaped-entities": "off",
"import/default": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@next/next/no-img-element": "off"
}
}
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Nom de la PR

## Changements

## Breaking changes

## Ce qu'il reste à faire (POUR LES DRAFTS)

- [ ] Vérifier le build
- [ ] Lint
- [ ] Supprimer les console.log / code commenté
40 changes: 27 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,21 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
- run: yarn lint
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- uses: lazy-actions/slatify@master
if: ${{ failure() }}
with:
Expand All @@ -27,14 +34,21 @@ jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
- run: yarn build
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm build
- uses: lazy-actions/slatify@master
if: ${{ failure() }}
with:
Expand All @@ -53,7 +67,7 @@ jobs:
env:
RESOURCE_NAME: ${{ github.ref == 'refs/heads/master' && 'prod-front' || github.ref == 'refs/heads/teaser' && 'prod-teaser' || 'dev-front' }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install oc
uses: redhat-actions/oc-installer@v1
with:
Expand Down
31 changes: 29 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,42 @@

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage
/.nyc_output

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
pnpm-debug.log*
pnpm-error.log*

# local env files
.env*.local
.env
.vscode/
yarn-error.log

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# docs
/docs

# Webstorm
.idea/
Empty file modified .prettierrc
100755 → 100644
Empty file.
34 changes: 34 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import type { StorybookConfig } from '@storybook/nextjs';
import path from 'path';

const config: StorybookConfig = {
stories: ['./../src/**/*.mdx', './../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
'@storybook/addon-coverage'
],
framework: {
name: '@storybook/nextjs',
options: {
},
},
docs: {
autodocs: 'tag',
},
webpackFinal: (config) => {
/**
* Add support for alias-imports
* @see https://github.com/storybookjs/storybook/issues/11989#issuecomment-715524391
*/
config!.resolve!.alias = {
...config.resolve?.alias,
'@': [path.resolve(__dirname, '../src/'), path.resolve(__dirname, '../')],
};

return config;
}
};
export default config;
1 change: 1 addition & 0 deletions .storybook/manager-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<meta name="robots" content="noindex" />
10 changes: 10 additions & 0 deletions .storybook/preview-body.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<style>
:root {
--font-montserrat: 'Montserrat', sans-serif;
--font-lexend: 'Lexend', sans-serif;
}

.icon {
color: black;
}
</style>
2 changes: 2 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lexend&family=Montserrat:wght@400;600;700&display=swap" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/modern-normalize/2.0.0/modern-normalize.min.css" />
20 changes: 20 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { Preview } from '@storybook/react';
import { expect } from '@storybook/jest';
import * as matchers from '@testing-library/jest-dom/matchers';
expect.extend(matchers);

import '@/styles.scss';

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
};

export default preview;
38 changes: 29 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
FROM node:16
FROM node:18 AS base
RUN npm install -g pnpm

ENV NODE_ENV=production
FROM base AS deps
WORKDIR /srv/app

RUN chown node:node .
COPY --chown=node:node package.json pnpm-lock.yaml ./

USER node
RUN pnpm install --frozen-lockfile

COPY --chown=node:node package.json yarn.lock ./
FROM base AS builder
WORKDIR /srv/app

RUN yarn --frozen-lockfile
COPY --from=deps /srv/app/node_modules ./node_modules

COPY --chown=node:node ./ ./
COPY --chown=node:node . .

RUN yarn build
RUN pnpm build

FROM base AS runner
WORKDIR /srv/app
ENV NODE_ENV=production

COPY --from=builder /srv/app/public ./public

# Set the correct permission for prerender cache
RUN mkdir .next
RUN chown node:node .next

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=node:node /srv/app/.next/standalone ./
COPY --from=builder --chown=node:node /srv/app/.next/static ./.next/static

RUN chown node:node .
USER node

CMD yarn start
CMD ["node", "server.js"]
Loading

0 comments on commit 9d43062

Please sign in to comment.