Skip to content

DalgoT4D/webapp

Repository files navigation

Dalgo frontend

License: AGPL v3 Code coverage badge

Installation instructions

yarn install

Run the development server

You will need to run the Django backend. Once that is running, specify its URL in the .env under

NEXT_PUBLIC_BACKEND_URL=<url of django backend>

Next, generate a security secret using https://generate-secret.vercel.app/32 and set it in

NEXTAUTH_SECRET=<secret>

Finally, select an available port on your system and define the URL for this frontend

NEXTAUTH_URL=http://localhost:<port>

Now you can start the application

yarn dev

Open http://localhost:<port> with your browser to see the result.

Development convention

Refer to this guide

Using Docker on Dev

Make sure you have docker and docker compose installed.

Step 1: Copy .env file to Dcoker folder

Step 2: Build the Docker image

All the variables with NEXT_PUBLIC prefix need to be added to the build command. This is because we are running the application as standalone mode

docker build -f Docker/Dockerfile --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') --build-arg NEXT_PUBLIC_BACKEND_URL="<url of django backend>" -t dalgo_frontend:0.1 .

Step 3: Start the application

docker compose -f Docker/docker-compose.yaml --env-file .env up