From 6cf2272aaa422074864bd61bf9b43b821a20719e Mon Sep 17 00:00:00 2001 From: Erland A Syafiq Date: Sun, 2 Jun 2024 13:56:13 -0400 Subject: [PATCH] Added pruning to yaml file --- .github/workflows/vtmunc-runner.yml | 2 ++ aws/ec2-setup.sh | 24 +++++++++++------------- public/src/pages/Home.jsx | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/vtmunc-runner.yml b/.github/workflows/vtmunc-runner.yml index 1114f19..7cb0152 100644 --- a/.github/workflows/vtmunc-runner.yml +++ b/.github/workflows/vtmunc-runner.yml @@ -30,3 +30,5 @@ jobs: run: docker rm -f vtmunc || true - name: Run container run: docker run -p 8080:8080 -d --name vtmunc vtmunc/vtmunc + - name: Clean up (Removes old containers) + run: docker system prune -f diff --git a/aws/ec2-setup.sh b/aws/ec2-setup.sh index ec78371..e13e8bc 100644 --- a/aws/ec2-setup.sh +++ b/aws/ec2-setup.sh @@ -6,18 +6,12 @@ curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo sudo apt update sudo apt install caddy -# create user -sudo useradd -m -d /home/webapp -s /bin/bash webapp -sudo usermod -aG sudo webapp -sudo passwd -d webapp +# Writes config file +sudo wget https://raw.githubusercontent.com/Trafix120/VTMUNC/main/reverse-proxy/CaddyFile -O /etc/caddy/Caddyfile +sudo systemctl enable caddy +sudo systemctl restart caddy -# Allow ssh for webapp -sudo mkdir /home/webapp/.ssh -sudo cp /home/ubuntu/.ssh/authorized_keys /home/webapp/.ssh/authorized_keys -# Set the correct permissions for the authorized_keys file -sudo chmod 600 /home/webapp/.ssh/authorized_keys -sudo chown webapp:webapp /home/webapp/.ssh/authorized_keys # Install Docker # Add Docker's official GPG key: @@ -36,17 +30,21 @@ sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -# Add docker to user group -sudo usermod -aG docker $USER + # Add github runner -# Create a folder + +# Creates user githubrunner sudo useradd -m -d /home/githubrunner -s /bin/bash githubrunner sudo passwd -d githubrunner sudo usermod -aG sudo githubrunner sudo usermod -aG docker githubrunner + +# Login to githubrunner su githubrunner cd ~ + +# Creates a folder mkdir actions-runner && cd actions-runner # Download the latest runner package curl -o actions-runner-linux-x64-2.316.1.tar.gz -L https://github.com/actions/runner/releases/download/v2.316.1/actions-runner-linux-x64-2.316.1.tar.gz diff --git a/public/src/pages/Home.jsx b/public/src/pages/Home.jsx index 201a6b2..ab0c750 100644 --- a/public/src/pages/Home.jsx +++ b/public/src/pages/Home.jsx @@ -9,10 +9,10 @@ function Home() {

- Feb 2nd - Feb 4th + Spring 2025

- VTMUNC 2024 + VTMUNC 2025

The premier Model United Nations conference for high school students