Skip to content

Latest commit

 

History

History
76 lines (44 loc) · 1.97 KB

README-en.md

File metadata and controls

76 lines (44 loc) · 1.97 KB

mann-eller-kvinne-frontend

🇳🇴 Norwgian

This is the frontend part of the mann-eller-kvinne project. For more information about the project, see the backend repo

Logo

Get started

Manual installation (developer mode)
  1. Clone the repo and install dependencies

    • node.js
    • yarn
  2. Install the project dependencies

yarn install
  1. Create a copy of the .env.example file and name it .env. Then, replace the URL within it with one pointing at your own instance of the backend.

  2. Run the web app

yarn dev
Docker (deployment)

Option 1 - Use a prebuilt image

  1. Run the webapp
docker run -d -p 3000:3000 --name mann-eller-kvinne-frontend ghcr.io/lblend/mann-eller-kvinne-frontend:latest

You are free to change the variables as you desire.

Note that by choosing this option you can't set the address for the backend yourself. You are forced to host your backend on http://localhost:5000. This is due to the javascript bundler "vite" not allowing you to set environment variables at run time, only at build time. Is this stupid? Yes, however it is out of our control and we'll just have to deal with it.

Option 2 - Build your own docker image

  1. Clone the repo

  2. Make sure to go into the Dockerfile and point the VITE_API_URL to your backend instance.

  3. Build the Docker image

docker build -t mann-eller-kvinne-frontend .
  1. Create a container and run it
docker run -d -p 3000:3000 --name mann-eller-kvinne-frontend mann-eller-kvinne-frontend

Note that if you've changed the running port in the dockerfile, you need to change the portnumber in the command as well.

Contributing

See the contribution guidelines before getting started.