web: remove all unnecessary junk from the container after building (experiment & saves ~2GBs)
This commit is contained in:
parent
fdc1f1aadf
commit
f0c39f5837
@ -1,3 +1,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
build
|
build
|
||||||
bun.lockb
|
bun.lockb
|
||||||
|
.gitignore
|
@ -10,4 +10,12 @@ ENV NEXT_TELEMETRY_DISABLED=1
|
|||||||
|
|
||||||
RUN bun install
|
RUN bun install
|
||||||
RUN bun run build
|
RUN bun run build
|
||||||
|
|
||||||
|
RUN rm -rf src eslint.config.mjs tsconfig.json
|
||||||
|
|
||||||
|
RUN bun remove "@emotion/react" "@emotion/styled" "@mui/icons-material" "@mui/material" "react" "react-dom" "sass"
|
||||||
|
# bun prune --production
|
||||||
|
# Uh-oh. bun prune is a subcommand reserved for future use by Bun.
|
||||||
|
RUN bun remove "typescript" "@types/node" "@types/react" "@types/react-dom" "eslint" "eslint-config-next" "@eslint/eslintrc"
|
||||||
|
|
||||||
ENTRYPOINT ["bun", "run", "start"]
|
ENTRYPOINT ["bun", "run", "start"]
|
@ -2,7 +2,6 @@ import type { NextConfig } from "next";
|
|||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
distDir: "build",
|
distDir: "build",
|
||||||
output: "standalone",
|
|
||||||
rewrites: async () => {
|
rewrites: async () => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user