-
Notifications
You must be signed in to change notification settings - Fork 0
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: Add Docker setup #9
base: main
Are you sure you want to change the base?
Conversation
@@ -11,14 +11,14 @@ | |||
"test": "jest", | |||
"format": "prettier --write \"**/*.{js,ts,json,md}\"", | |||
"prepare": "husky", | |||
"lint": "eslint . --fix", | |||
"lint": "eslint src --fix", |
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.
For some reason, it was trying to lint the code generated in dist/
?
rl.question(dockerMessage, (answer) => { | ||
rl.close(); | ||
const yesOrNo = answer.trim() || "nillion-quickstart"; | ||
if (/y|yes|n|no/.test(yesOrNo)) { | ||
resolve(yesOrNo === "y" || yesOrNo === "yes"); | ||
} else { | ||
console.log("Using default: no Docker container."); | ||
resolve(false); | ||
} | ||
}); |
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.
I'd like to replace this part of the code with something more robust like prompt.js or inquirer.js!
@@ -19,3 +19,5 @@ export const installDependencies = async () => { | |||
}); | |||
console.log("Dependencies installed successfully."); | |||
}; | |||
|
|||
export const installRepoPackage = installDependencies("npm", ["install"]); |
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.
I abstracted the commands passed in, but didn't use it in the end. Maybe I should undo this work, idk.
<%= it.projectName %>: | ||
restart: always | ||
environment: | ||
- WATCHPACK_POLLING=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.
This is for Windows users, but I am not sure if it works because I don't have a Windows machine.
|
||
EXPOSE 3000 | ||
ENV PORT=3000 | ||
CMD ["sh"] |
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.
In some case, users may want to run commands inside the Docker container, now they easily can.
This PR adds a Docker setup for users having problems meeting the requirements to run a nillion app.