-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client): bump versions + refactor docker to reduce filesize
- Loading branch information
Showing
11 changed files
with
3,236 additions
and
2,059 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
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,24 +1,40 @@ | ||
### Build | ||
FROM node:16.2.0-alpine as builder | ||
### Deps | ||
FROM node:16-alpine AS deps | ||
RUN apk add --no-cache libc6-compat | ||
WORKDIR /app | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install --frozen-lockfile --network-timeout 1000000 | ||
|
||
### Builder | ||
FROM node:16-alpine AS builder | ||
WORKDIR /app | ||
COPY --from=deps /app/node_modules ./node_modules | ||
COPY . . | ||
RUN yarn build | ||
|
||
### Runner | ||
FROM node:16-alpine AS runner | ||
WORKDIR /app | ||
|
||
LABEL org.opencontainers.image.source="https://github.com/kostaspt/domane" | ||
|
||
WORKDIR /usr/src/app | ||
ENV NODE_ENV production | ||
|
||
ARG DOMAIN | ||
RUN test -n "$DOMAIN" | ||
RUN addgroup -g 1001 -S nodejs | ||
RUN adduser -S nextjs -u 1001 | ||
|
||
# Install dependencies | ||
COPY package.json yarn.lock ./ | ||
RUN (yarn check --integrity && yarn check --verify-tree) || yarn install --frozen-lockfile --network-timeout 1000000 | ||
COPY --from=builder /app/next.config.js ./ | ||
COPY --from=builder /app/public ./public | ||
COPY --from=builder /app/package.json ./package.json | ||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ | ||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static | ||
|
||
# Generate production build | ||
COPY . . | ||
RUN yarn build | ||
USER nextjs | ||
|
||
# Remove dev dependencies | ||
RUN yarn install --production | ||
ARG DOMAIN | ||
RUN test -n "$DOMAIN" | ||
|
||
EXPOSE $CLIENT_PORT | ||
ENV PORT $CLIENT_PORT | ||
|
||
CMD ["sh" , "-c", "yarn start -p ${CLIENT_PORT}"] | ||
CMD ["node", "server.js"] |
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,3 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,51 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"alwaysStrict": true, | ||
"baseUrl": "./src", | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"target": "es5", | ||
"lib": [ | ||
"dom", | ||
"dom.iterable", | ||
"esnext" | ||
], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"noEmit": true, | ||
"incremental": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"noEmit": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"target": "esnext", | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"baseUrl": "./src", | ||
"paths": { | ||
"@/*": ["./*"], | ||
"@assets/*": ["./assets/*"], | ||
"@components/*": ["./components/*"], | ||
"@store": ["./store"], | ||
"@store/*": ["./store/*"], | ||
"@test/*": ["../test/*"] | ||
} | ||
"@/*": [ | ||
"./*" | ||
], | ||
"@assets/*": [ | ||
"./assets/*" | ||
], | ||
"@components/*": [ | ||
"./components/*" | ||
], | ||
"@store": [ | ||
"./store" | ||
], | ||
"@store/*": [ | ||
"./store/*" | ||
], | ||
"@test/*": [ | ||
"../test/*" | ||
] | ||
}, | ||
}, | ||
"exclude": [ | ||
".next", | ||
"node_modules" | ||
], | ||
"include": [ | ||
"next-env.d.ts", | ||
"**/*.ts", | ||
"**/*.tsx" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} | ||
} |
Oops, something went wrong.