git-gurus-itu-devops / itu-minitwit

0 stars 0 forks source link

Adds staging env #44

Closed A-Guldborg closed 6 months ago

A-Guldborg commented 6 months ago

This creates a staging environment that can be deployed through vagrant up staging and then deployed manually through github.

URL: 209.38.178.2

(Add port :5000 and :5001 and endpoints just like in production. Uses a separate database in the same managed database cluster but otherwise works the same)

A-Guldborg commented 6 months ago

NB: Before merging, checkout to this branch locally and run vagrant rebuild droplet1 (this safely restarts the droplet with production without changing any online configuration such as reserved IP etc.)

Then vagrant ssh droplet1 (or ssh into the droplet normally) and run apt install dos2unix and dos2unix /minitwit/deploy.sh. If no step fail, then the environment is ready for deploying and PR can be merged.

NB: It seems that for me, vagrant rebuild often fails with an error while installing Docker causing the deploy pipeline to fail. Make sure docker is installed without errors when rebuilding.