A WEB application providing weather, news, financial information.
They are 2 main components :
- Backend : a Node.js/Express.js webapi using a mongo database for storage
- Frontend : an angular webapp
| -- .env -> Environment variables configuration
| -- docker-compose.yml -> Docker
| -- docker-compose-release.yml -> Docker release version
| -- launch.bat -> The launcher of the project
| -- /public/ -> frontend webapp
| -- angular.json
| -- package.json
| -- Dockerfile
| -- /src
| -- /app/ -> contains views/components/services/shared for website.
| -- /server/ -> backend webapi
| -- app.js -> backend entry point running expressjs
| -- Dockerfile
| -- package.json
You can configure some environment variables in the .env file. Then, you can have a preview of the parameters injected:
docker-compose config
At the root of the solution, run the command :
launch.bat up
It will docker-compose to build + run full stack (can take a moment while building).
It will open in the browser:
- the frontend webapp (port 80)
- the backend webapi (port 30001).
launch.bat down
It uses docker images hosted in Docker Hub Registry (fastest way as images are already built).
They are compatible with for Linux OS.
docker-compose -f docker-compose-release.yml up
Docker images | Docker Repository | Description |
---|---|---|
mongo:latest | link | Mongo Database (official) |
danmgs/weather-app-frontend:1.1 | link | Angular WebApp |
danmgs/weather-app-frontend:1.1 | link | WebApi using Node.js/Express.js |
- AZURE : create a web app in multi-container mode, use file docker-compose-release.yml
- AWS : create a web app via Elastic Beanstalk interface, in multi-container mode, use file Dockerrun.aws.json
You can read the README from folder public or server respectively.