- You can always add more data to your mock backend with editing
db.json
directly
pnpm i
pnpm start:mock-server
pnpm start
- A multi-stage Docker build
- Smaller container
- Automated works
- Here is the steps you should take if you wanted to create image by hand
docker build . -t task-tracker:<version>
- Here is the steps if you wanna create a container from it:
- Update the network section in the
docker-compose.yml
to put it in the right network docker-compose up -d
- Update the network section in the
- Here is the steps to start app in dev env:
pnpm i
pnpm start:dev
- To stop app in dev env issue this command in your terminal:
pnpm stop:dev
- We serve our Angular app with Nginx that's why I mapped port
4200
to port80
. - We assume that on the server our app will connects to a real backend
- First I just tried to stick to the
localhost
in Angular app and our fake backend. But it did not pan out. Why? TBH I'm not quite sure but maybe this stackoverflow Q&A helps. Please feel free to tell me if you know the answer. - The same problem happened with our
mock-server
and I changed thelocalhost
to0.0.0.0
- Do not worry about this section in
dev.docker-compose.yml
because AFAIK - based on experience not documentation - this command will be executed in theWORKDIR
/working_dir
:command: sh -c '(npm run start:mock-server &) && npm start'