-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
90 changed files
with
2,535 additions
and
3,126 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Backend CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ./backend | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 22 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 22 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Check types | ||
run: npm run type-check | ||
|
||
- name: Build Express app | ||
run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,42 @@ | ||
# CSESoc Website | ||
|
||
## How to run locally | ||
- Install dependencies with `npm install` | ||
- Run using `npm run dev` | ||
This repository contains the code for a redesigned CSESoc website. The current website can be found at [csesoc.unsw.edu.au](https://csesoc.unsw.edu.au/). | ||
|
||
## How to run locally (without Docker, development mode) | ||
|
||
### Running the frontend | ||
|
||
1. Navigate to the `frontend` directory with `cd frontend`. | ||
|
||
2. Create a `.env` file in the `frontend` directory with the following content: | ||
``` | ||
NEXT_PUBLIC_BACKEND_HOST=localhost | ||
NEXT_PUBLIC_BACKEND_PORT=9000 | ||
``` | ||
This is necessary for the frontend to communicate with the backend. | ||
|
||
2. Install dependencies with `npm install` if you haven't already. | ||
|
||
3. Run using `npm run dev`, changes will be reflected live. | ||
|
||
See `package.json` for further commands to lint, build, etc. | ||
|
||
|
||
### Running the backend | ||
|
||
1. Navigate to the `backend` directory with `cd backend`. | ||
|
||
2. Install dependencies with `npm install` if you haven't already. | ||
|
||
3. Run using `npm run dev`, changes will be reflected live. | ||
|
||
|
||
## How to run locally (with Docker, production mode) | ||
|
||
Make sure you have [Docker](https://docs.docker.com/get-docker/) installed. | ||
|
||
1. Run `docker compose build` in the root directory, this will build the frontend and backend services in production mode, meaning live changes will not be reflected. In the future, you will only need to run either `docker compose build frontend` or `docker compose build backend` if you have only made changes to the frontend or backend respectively. | ||
|
||
2. Run `docker compose up` (or `docker compose up -d` to run in the background) in the root directory, this will start the frontend and backend services. | ||
|
||
3. Run `docker compose down` to stop the services. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules | ||
npm-debug.log | ||
build | ||
.git | ||
*.md | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:22-alpine | ||
|
||
ENV NODE_ENV production | ||
|
||
WORKDIR /app | ||
COPY . . | ||
|
||
RUN npm ci | ||
RUN npm run build | ||
|
||
EXPOSE 9000 | ||
|
||
CMD ["npm", "start"] |
Oops, something went wrong.