This repository was archived by the owner on Mar 9, 2022. It is now read-only.
Containerized the app-backend 🐳🐳🐳 #87
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A lot of things have happened.
Regarding...
yarn.lock:yarn installyarn remove puppeteer jest-puppeteerdocs.test.js:other files:
docker-composemanages multiple images.Makefilegives easy access to docker commands.SETUP_TYPE=manual|dockerto.env.samplefile. This is being used insidepreCommit.shfile while runningpre-commithook..prettierignorefile to keepMakefileformat intact.docker-compose-test.ymlis an optional file, which can be used to run tests inside new docker meant to run tests. However, I am using the same(dev) container for tests during thepre-commithook.How it all works:
make setupcommand inside the project directory.make start. This runs docker containers in the background and they can consume APIs athttp://localhost(at default, port 80).sh preCommit.sh, which checks whether the setup ismanualordockerand based on that, it runs tests accordingly.preCommit.shfile, I am not using&&to run all commands in one line because I kept getting the error:stdin is not a tty. but spreading across multiple lines 'fixed' it.Only downside to this whole setup is, users on windows with "regular" setup of this project, using GitBash cannot run
git commitdirectly. but they would have to prependwinpty.Example:
winpty git commit -m "Commit message". This is a limitation with winpty and not the setup itself. but if they use Powershell, it works all OK. And docker setup works fine on both Gitbash and Powershell.This setup needs to be rigorously tested, yet(I've done my best but..). On different machines. Please help me do that!!! As far as the setup itself, it's functional but few things can be modified and I'd love to have suggestions.