for IT manager
Contest General Steps:
- Make Contest Page
- Make VMs
- Set Cloudflare Subdomain
- Before Contest, Resize Servers
Note about editing and testing:
- When updating page, if not too familiar with HTML, copying usually works; confirm & test via
yarn devbefore pushing. - Needs nodeJS and Yarn to test
- If not, download nvm and
corepack enable - This installation might run into issues if you already have pieces installed
- This project uses yarn 3 Steps to test:
- If not, download nvm and
git clone https://github.com/teamscode/teamscode-websitecd teamscode-websiteyarnyarn dev
Files to edit:
‘Content’ pages are defined by markdown files in /content
In /content/contests, copy the latest contest’s file (named spring-2025.md) into a new file named the current contest (summer-2025.md)
Edit information within.
Notes:
- Remove ‘winners’ section
- Change ‘cards’ to divisions, prize value, past participation, teams size
- Edit timeline to the current plan
- Edit ‘status’ to upcoming
- Remove editorials and CF gyms
- Update the contest portal link in
rules.md - Remove ‘participants’
In /content/contests, copy the latest contest’s folder (/content/contests/spring-2025) into a new folder named the current contest (summer-2025)
Edit sponsors.md, prizes.md, and speakers.md
Updating Routing & Buttons:
Links that direct to the contest portal (e.g. spring25.teamscode.org) must be updated
Tip: Command F on last contest's name ('spring25')
- Front page button:
index.vue - Contest portal links on contest page:
/contest/_slug.vue - Might want to disable 'Youtube Livestream' button (by adding
disabledin the element in/contest/_slug.vue)
Start VM: Azure Portal
- Create a subscription
- Create a VM
- x64
- Ubuntu
- Dasv5, 2 core
- SSH key
- username: teamscode
- use existing public key
- enter your machine’s public key. how-to
- Get the machine's IP
- Try logging in:
ssh teamscode@[ip] - On azure, use network -> network settings -> create port rule -> Inbound -> Destination ports: Any
Setup HTTPS Certificate:
- Add DNS Record
- Log into cloudflare
- Go into 'Teamscode' account
- Go into 'teamscode.org' domain
- Select DNS -> Add Record
- A Type, Name: contest name (summer25), No proxy, TTL: auto
sudo apt install certbotsudo certbot certonly- Use option 1: Run an http server locally...
- When prompted for 'domain name' use: contest protal domain (e.g. summer25.teamscode.org)
- Make note of where it stored the certificate
- Should be something like:
/etc/letsencrypt/live/summer25.teamscode.org/fullchain.pem
Start Contest Portal:
- Install docker
git clone https://github.com/teamscode/portal-deploy.gitcd portal-deploy/portal-backend- Edit in services -> backend -> volumes
- Change the pathes indicating where the certificates are to where the new certificates are
- There is a bug in how the docker image creates files. manually change
/data/backend/ssl/server.crtand/data/backend/ssl/server.keyto files instead of directories. sudo docker compose up -d-dtag runs it as daemon. If its not working, run it without the-dtag, and check what the error logs say.
Test:
Navigate to the machine's IP via browser and test out the website:
Root account is:
- username: root
- password: rootroot
- Change the password after you log in, root -> management -> General -> User -> Edit button on the right side of the user
Portal Setup:
- Turn on API keys (it's a toggle buttons somewhere on the portal)
- Configure mail
- SMTP Server: smtp.gmail.com
- Port: 587
- Username: Your teamscode email. NOTE: your email account needs 2FA enabled in order for google to allow SMTP routing via this account. Turn 2FA on via "manage my account" in gmail.
- Password: You'll need to create an 'app password' for this app to access your email account. See how here
- Use the 'send test email' to confirm
Start VM:
- Create a second VM
- Same configurations as above
- Ensure the two services share the same network
- in "Networking", "Virtual Network" should be set to the same one as the portal (e.x.
portal-vnet)
- in "Networking", "Virtual Network" should be set to the same one as the portal (e.x.
Start Judger:
Once logged in,
- Install docker
git clone https://github.com/teamscode/portal-deploy.gitcd portal-deploy/portal-judger- Edit
docker-compose.yaml:SERVICE_URL: set[THIS_MACHINE_IP]to this machine's private IP address (found via azure portal)BACKEND_URL: set[BACKEND_IP]to portal VM's private IP addressRSYNC_MASTER_ADDR: set[BACKEND_IP]to portal VM's private IP address (10.0.0.4)
sudo docker compose up -d
Test:
Check on admin, under 'judge server'. It should show a server.
This manages our ‘teamscode.org’ domain. We need to access this each contest to add the contest sub-domain (the spring25.teamscode.org)
Access Via: dash.cloudflare.com” Log in Via: exec@teamscode.org has access. If others want direct access (since exec is hard to sign in with 2fa), lmk At the dashboard -> account home -> teamscode.org to get into domain dashboard go to DNS -> Add Record Name: the contest name (e.g. summer25, spring26, etc) IPv4 address: Azure contest VM's address