This project is the master website for the Hack Cambridge Foundation.
This website will contain the following information about the Hack Cambridge Foundation and its annual hackathons:
- History of the foundation
- Charity Status documentation
- Foundation Agreements documents
- Trustee documents
- Past committee members
- Past hackathon volunteers
- Pictures of past hackathons
- List of past sponsors
- List of supporters
- List of logistic supporters
- Hack Cambridge 2016 - First
- Hack Cambridge 2017 - Recurse
- Hack Cambridge 2018 - Ternary
- Hack Cambridge 2019 - 4D
- Hack Cambridge 2020 - 101
- Hack Cambridge 2021 - Hex
- Hack Cambridge 2022 - Atlas
- Hack Cambridge 2023 - Spyder
- Take a thorough look through the Dockerfiles for each hackathon in the docker folder
- Follow a similar structure in your docker-compose file and Dockerfile
- Host the hackathon website in a new EC2 instance (refer to steps below)
- Add a new CNAME in Cloudflare using the template
hc-<year>-<hackathon-name>
- Configure your CNAME to point to your new EC2 instance's Public IPv4 DNS address
- Access your new hackathon website at
<CNAME>.hackcambridge.com
-
Create an EC2 Instance:
- Go to the EC2 dashboard on AWS.
- Launch a new instance. The Amazon Linux 2 or Ubuntu AMIs are popular choices. We recommend using Ubuntu AMIs.
- Choose an instance type (e.g., t2.micro if you're testing or need a free tier option).
- Set up your key pair for SSH access. (We recommend using the DevTeam key pair - Ask Pragash Mohanarajah for the DevTeam.pem file)
- Configure the security group to open ports 80 (HTTP) and any other ports you need. We recommend using the existing Hackathon Web Server security group.
- Launch the instance.
-
Connect to the EC2 Instance: Use the following SSH command (substitute
<your-key>.pem
and<your-ec2-public-ip>
):ssh -i <your-key>.pem ec2-user@<your-ec2-public-ip>
-
Install Docker and Docker Compose: Once you're connected to the EC2 instance, install Docker:
For Amazon Linux 2:
sudo yum update -y sudo amazon-linux-extras install docker sudo service docker start sudo usermod -a -G docker ec2-user
For Ubuntu:
sudo apt update sudo apt install docker.io -y sudo systemctl enable docker sudo systemctl start docker sudo usermod -aG docker $USER
After that, log out and log back in for the group permissions to take effect.
Then, install Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose docker-compose --version
-
Copy Your Docker Compose File to the EC2 Instance: Use
scp
to copy your Docker Compose file to the EC2 instance:scp -i <your-key>.pem docker-compose.yml ec2-user@<your-ec2-public-ip>:~/
-
Run the Docker Compose Application: On your EC2 instance, navigate to where the
docker-compose.yml
file is located and run the following command to start the services:docker-compose up -d
This will pull the images and run the services in detached mode.
This website uses a template for creating applications using Next.js 14 (pages directory) and NextUI (v2).
Note: Since Next.js 14, the pages router is recommend migrating to the new App Router to leverage React's latest features
Read more: Pages Router
To create a new project based on this template using create-next-app
, run the following command:
npx create-next-app -e https://github.com/nextui-org/next-pages-template
You can use one of them npm
, yarn
, pnpm
, bun
, Example using npm
:
npm install
npm run dev
If you are using pnpm
, you need to add the following code to your .npmrc
file:
public-hoist-pattern[]=*@nextui-org/*
After modifying the .npmrc
file, you need to run pnpm install
again to ensure that the dependencies are installed correctly.
Licensed under the MIT license.