Skip to content

Repository for the JobFair site starting 2022

Notifications You must be signed in to change notification settings

KSET/jobfair-2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FER Job Fair website

This is the repository for the FER Job Fair website.

The current folder contains the frontend code. The backend code is located in the backend folder.

Setup

Make sure to install the dependencies first:

yarn install

The .tool-versions file contains the versions of the tools used in this project. If you use asdf, you can run asdf install to install the correct versions.

Next, create a .env file. The template for the files is .env.example.

Make sure to follow the setup steps for the backend next.

Next, generate the GraphQL schema on the backend:

yarn graphql:schema:dump

And then generate the GraphQL types for the frontend:

yarn graphql:schema:gen

Development

Start the development server on http://localhost:3000 (by default, set the PORT environment variable to change the port)

yarn dev

Caddy configuration

Caddy is used as a reverse proxy for the frontend and backend. The configuration file is the Caddyfile. To run Caddy, run the following command:

sudo caddy run

It assumes that the frontend is running on port 3000 and the backend is running on port 3001. It will start a reverse proxy on port 80.

Production

Build the frontend for production:

yarn build

Start the frontend in production mode:

yarn start

Docker

To run the whole application in a Docker container, run the following command:

docker compose up --build --detach --remove-orphans --pull always --wait

It will start all required services (frontend, backend, database, proxy, minio). No ports are exposed to the host machine. To access the application, you to create a docker-compose.override.yml file and add the appropriate configuration/overrides to it.