A self-hostable platform for conducting technical interviews
Generate JWT keys
./tools/generate-jwt-keys.shGenerate a .env file
./tools/generate-env.shBuild all room images
docker compose -f ./compose.insiders.yml buildBuild and start the application
docker compose up --buildGenerate JWT keys
./tools/generate-jwt-keys.shRun
docker compose upTo generate a docker network need for backend to work
You can kill the process with ^C after a few seconds
- Go to the
webdirectorycd web - Install dependecies
npm install
- Start dev server
npm run dev
Note
While in local development mode you can only connect to one instance of insider
- Go to the
backenddirectorycd backend - Install dependecies
npm install
- Launch docker daemon
- Create a Postgres DB
- Create a
.envfile like thisNODE_ENV='development' DATABASE_URL='postgres://<postgres user>:<postgres password>@<postgres host>:<postgres port>/<postgres db name>' DOCKER_SOCKET_PATH='<path to your docker socket, ususally: /var/run/docker.sock>' HASHING_SECRET_HEX='<output of openssl rand -hex 32>' REGISTRATION_OPEN='true' INSIDER_PERSISTENCE_DIRECTORY_PATH='/persistance' INSIDER_WORKING_DIRECTORY='/interview' INSIDER_START_ACTIVE_FILE_NAME='readme.txt' USE_LOCALHOST_INSIDER='true'
- Run DB migration
npm run drizzle-migrate
- Start dev server
npm run dev
Tip
You can prototype DB changes using
npm run drizzle-pushImportant
Before committing, run
npm run drizzle-generateTo save your changes as a DB migration file
- Go to the
insiderdirectorycd insider - Create a
.envfile like this:NODE_ENV='development' WORKING_DIRECTORY='./wd' START_ACTIVE_FILE_NAME='readme.txt' ROOM_INFO='{"json":{"id":"69a1c450-9701-4c0d-bb36-b839c79f3526","name":"test-room","type":"node","createdAt":"2024-10-02T19:57:11.011Z"},"meta":{"values":{"createdAt":["Date"]}}}' PERSISTENCE_DIRECTORY_PATH='./persistence'
- Install dependecies
npm install
- Start dev server
npm run dev
Currently we expose the host's docker socket to the backend container and to the traefik container. This means that if the backend container is compromised, the attacker will effectively have root access to the host machine
Why this is dangerous
Traefik docs on this matter
For this reason
Caution
For production use this inside a virtual machine or on an isolated server
In future there is a plan to move to resolve this issue, but additional research is needed.
Currently horizontal scaling is not supported. This should not be a problem for most users, who want to use the system for technical interviews in their company
However horizontal scaling through kubernetes might be supported in the future
