The application is up and running on: https://weather-app-kgebkmlmyq-ew.a.run.app
- Linux-based system with POSIX compliant shell (required for the scripts to work)
- Docker engine & docker-compose plugin preferably the latest version, otherwise you may encounter errors
- Make sure the scripts have execute permissions, e.g:
chmod +x ./scripts/start.sh ./scripts/remove.sh
- Make sure to add an
.env
file to the scripts folder with the API_KEY
Notes:
- ONLY run the application using the start/remove scripts, not directly via the docker. (Unless you are sure you know what you're doing)
- For any issue(s), contact a maintainer/contributor in any way you see fit
- Use this to start the local environment:
./scripts/start.sh
- Use this to stop the local environment:
./scripts/remove.sh
- If you encounter any permission related errors from the docker(s), follow these steps:
- Stop the docker using:
yes | ./scripts/remove.sh
- Remove the following folders:
rm -rf ./db-dev-data ./be/node_modules ./fe/node_modules ./scripts/cache
- Make sure you have the latest docker and docker-compose versions (follow step 2 in the perquisites)
- Run
yes | ./scripts/start.sh
and hope for the best - If the problem persists, contact a maintainer/contributor in any way you see fit
Currently the application is deployed on google cloud.
To deploy a new version, first make sure you have the following (once per machine):
- gcloud cli
- Run:
gcloud init
- Run:
gcloud auth configure-docker europe-west10-docker.pkg.dev
Then do as follows: (On every version update)
- Run
docker-compose -f docker-compose-prod.yml up --build -d
and check the application works via http://localhost:8080 - Tag the created image with the following format:
docker tag <BUILT_IMAGE> europe-west10-docker.pkg.dev/weather-application-418809/personal/<IMAGE_NAME>
- Push the image:
docker push europe-west10-docker.pkg.dev/weather-application-418809/personal/<IMAGE_NAME>
- Stop the running docker-compose:
docker-compose -f docker-compose-prod.yml down
TODO Make a CI/CD to make this automatic