A meta repository storing config files for the running of all ECSS related services on our VM.
The main reason for this repository is to version control our docker-compose.yaml file. This file is what is responsible for the majority of our infrastructure and this respository allows us to version control that infrastructure. It is our attempt at IaC (Infrastructure as Code)
- Infrastructure configuration
- docker-compose.yaml The docker compose file to run portainer and caddy
- Configs for services that we run
- Caddyfile - The config for our reverse proxy
- Environment variables for docker compose services
- env/web_main.env.example - Example env file for the main website
- env/web_sotonverify.env.example - Example env file for the sotonverify website
- env/web_teamreg.env.example - Example env file for the hackathon team registration website
- env/bot_sotonverify.env.example - Example env file for the sotonverify bot
- Secrets
- secrets/db_mongo.example.txt - Used to store the mongodb uri for database scripts
- A script to update the infrastructure
- install.sh - Script to install the infrastructure from scratch
- update.sh - Script to pull the latest changes and restart the infrastructure
- prune.sh - Script to prune various docker objects (containers, images, volumes) (daily crontab)
- backup-env.sh - Script to backup the env files (daily crontab)
- restore-env.sh - Script to restore the env files
- backup-db.sh - Script to backup the mongodb database (daily crontab)
- restore-db.sh - Script to restore the mongodb database
- delete-old.sh - Script to delete backups older than 30 days (daily crontab)
- Docker v25+
- Clone the repository
git clone https://github.com/ecss-soton/infrastructure.git && cd infrastructure
- Copy the example env files and fill them in with the production values
cp env/web_main.env.example env/web_main.env && cp env/web_sotonverify.env.example env/web_sotonverify.env && cp env/web_teamreg.env.example env/web_teamreg.env && cp env/bot_sotonverify.env.example env/bot_sotonverify.env
- Configure the Caddyfile
You'll want to change our FQDN (society.ecs.soton.ac.uk + sotonverify.link) to your own.
- Run the infrastructure
docker compose up -d
- Run the update script
chmod +x scripts/update.sh && ./scripts/update.sh
- society.ecs.soton.ac.uk - The main ECSS website
- sotonverify.link - The sotonverify website
Both websites redirect www. to the non-www version