CYB has previously had a separate volunteer system and website, both of which were maintained by the IT group (previously X-group). After the old volunteer system unfortunately stopped being maintained and (eventually) stop functioning, CYB lost access to tools for logging volunteer hours, tracking the stock in Escape, and managing membership.
After a grueling semester of google sheets and paper logs, we have finally gotten the new system live! Previously the volunteer system and the main CYB website have been separate, but in an attempt to make the main website more appealing, the two have been merged into a single resource.
Visit the website at cyb.no
This is more or less the tools used to create the website.
- Domain registrar: domeneshop
- DNS provider: Cloudflare
- VPS: NREC
A development database and environment file have been developed so that volunteers may test the website locally.
Steps :
-
Clone the repository to your computer:
git clone https://github.com/cybernetisk/internsystem-v2.git
-
Create a file named
.env.development.local
and add the following variables:
DATABASE_USER = 'internsystem_v2_dev'
DATABASE_PASS = 'rp_C4N8^ev2I!vS^fbIkEub4'
DATABASE_SCHEMA = 'ISV2_development'
DATABASE_URL = "mysql://${DATABASE_USER}:${DATABASE_PASS}@localhost:3307/${DATABASE_SCHEMA}"
NEXTAUTH_URL = 'http://localhost:3005'
NEXTAUTH_CALLBACK = '/'
NEXTAUTH_SECRET = 'QuTxFdD3yon9X+83rRaio/vSgkfhvnwUglcIrnUwTLA='
NODEMAILER_NOREPLY_USER = 'noreply@cyb.no'
NODEMAILER_NOREPLY_PASSWORD = 'dvlk nswm cxbq qnds'
NEXT_PUBLIC_SANITY_API_VERSION = '2024-02-23'
NEXT_PUBLIC_SANITY_DATASET = 'production'
NEXT_PUBLIC_SANITY_PROJECT_ID = 'p4dmwf04'
-
Install npm
-
Install dependencies:
npm install
-
Create an ssh-key file named
dbtunnel_ssh
and add the following private key:
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEA9WTkHeoC2R3fFsffNuB0ldLALWIXPDRXjJV3XPXpzbGQR5xdN9xY
RMlst3QPSDYLayWL3E7YVm4ArnPYlLNmwUbWsMj/kDSgTcGRn09iuFWBGa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ZJhadsMRx0oddl4i
hMljAtbIGaDs5AC0JN6mXQV9ReVp17k/l1tCGXA4WzbdvS4XOxUBd02TMwWDYKN14eLiLe
THBr2PuZ0YlXnk4JNU8aUpl5mFJihX+c6FKCSxlssP+lpFHWVdcq1hJVwBi8q+/QvjsEtY
Xb4KOXTMAESdMAAAAYZGJ0dW5uZWxAaW50ZXJuc3lzdGVtLXYyAQID
-----END OPENSSH PRIVATE KEY-----
-
In a separate terminal, connect to the databse using an ssh-tunnel:
ssh -L 3307:localhost:3306 -i ~/.ssh/dbtunnel dbtunnel@158.39.200.46 -N
-
Generate database adapter client:
npx prisma generate
-
Start a development environment:
npm run dev
-
Navigate to the development endpoint:
http://localhost:3005
BTW: Notify easvebak@cyb.no if you are able to somehow gain access to the VPS, and you will be given 5 vouchers. (this is not a challenge, lol)