-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: optimize dockerfiles #226
base: prod
Are you sure you want to change the base?
Conversation
For some reason the initial NextJS request to get the current canvas info fails and I'm not sure why. I don't know if its because of my changes (presumably it is) or whether it just doesn't work locally in a dockerfile because I can't run the original ones 😓 |
# Disable Husky hooks https://typicode.github.io/husky/how-to.html#ci-server-and-docker | ||
ENV HUSKY=0 | ||
ENV PACKAGE_PATH=packages/backend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently looks like PACKAGE_PATH
is part of disabling Husky
# Disable Husky hooks https://typicode.github.io/husky/how-to.html#ci-server-and-docker | |
ENV HUSKY=0 | |
ENV PACKAGE_PATH=packages/backend | |
# Disable Husky hooks https://typicode.github.io/husky/how-to.html#ci-server-and-docker | |
ENV HUSKY=0 | |
ENV PACKAGE_PATH=packages/backend |
# Disable Husky hooks https://typicode.github.io/husky/how-to.html#ci-server-and-docker | ||
ENV HUSKY=0 | ||
ENV PACKAGE_PATH=packages/frontend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Disable Husky hooks https://typicode.github.io/husky/how-to.html#ci-server-and-docker | |
ENV HUSKY=0 | |
ENV PACKAGE_PATH=packages/frontend | |
# Disable Husky hooks https://typicode.github.io/husky/how-to.html#ci-server-and-docker | |
ENV HUSKY=0 | |
ENV PACKAGE_PATH=packages/frontend |
ENV HUSKY=0 | ||
ENV NODE_ENV=production | ||
ENV PACKAGE_PATH=packages/frontend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 29 and 31 are already set above, and NODE_ENV
should be automatically set by NextJS
# Uncomment the following line in case you want to disable telemetry during runtime. | ||
ENV NEXT_TELEMETRY_DISABLED 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have uncommented it 🧐
# Uncomment the following line in case you want to disable telemetry during runtime. | |
ENV NEXT_TELEMETRY_DISABLED 1 | |
ENV NEXT_TELEMETRY_DISABLED 1 |
@@ -30,7 +30,7 @@ | |||
"format:fix": "pnpm --recursive format:fix", | |||
"check": "pnpm --recursive check", | |||
"check:fix": "pnpm --recursive check:fix", | |||
"prepare": "husky", | |||
"prepare": "husky || true", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh?
const path = require("node:path"); | ||
|
||
module.exports = { | ||
output: "standalone", | ||
experimental: { | ||
// this includes files from the monorepo base two directories up | ||
outputFileTracingRoot: path.join(__dirname, "../.."), | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const path = require("node:path"); | |
module.exports = { | |
output: "standalone", | |
experimental: { | |
// this includes files from the monorepo base two directories up | |
outputFileTracingRoot: path.join(__dirname, "../.."), | |
}, | |
}; | |
const path = require("node:path"); | |
const monorepoRoot = "../.." | |
module.exports = { | |
output: "standalone", | |
experimental: { | |
outputFileTracingRoot: path.join(__dirname, monorepoRoot), | |
}, | |
}; |
Relatedly, would path.resolve()
be better here?
It could be nice to put the deployment scripts into |
I was having issues building the original docker files. These also only include what's necessary so the images are MUCH smaller: ~1.6GB to 160 MB.