Deployment
1. Docker Compose Services
Our docker-compose.yml runs four key services
Service | Image/Build | Role |
|
| Nginx server; handles port 80 and proxies |
|
| The Spring Boot REST API. |
|
| Relational database. |
|
| Custom service that runs automated DB dumps via crontab. |
2. Maintenance Commands
To help a new dev manage the site, here are the main commands:
- Start everything:
docker compose up -d - Stop everything:
docker compose down(you can add -v flag to delete all volumes) - View Backend Logs:
docker compose logs -f backend - Check Backups: Logs are stored in
./db_backup/logsand actual dumps are in./db_backup/backups. - Build: When in frontend/ or backend/ route directories use:
docker build . -t roboteamtwente/website-{name, e.g. "frontend"}:{version} - Pushing: First login to RoboTeam docker account on your device. Then ->
docker push roboteamtwente/website-{name, e.g. "frontend"}:{version}
5. Docker Compose Services
3. Deployment
When you are done developing, please consider building the images of services and push them.
After that you are able to ssh into our VPS that hosts a lot of products (main landing page included).
ssh user@h2960363.stratoserver.net
You have to add your user to that VPS's whitelist beforehand in order to login.
In there:
sudo -ito switch to superuser.cd dockerto the main directory where all containers are started from.vim docker-compose.ymland edit the used version of desired service(s) to the newest one.docker pull roboteamtwente/name:versionpull desired updated imagesdocker compose up -d nameOfTheContainerstart the container(s)