Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Get Started: development

Jasper edited this page May 17, 2023 · 1 revision

This page explains how to get started with the development version of this project. All development and deployment will use docker compose.

For setting up the server environment, check out Server setup.

1. Add the required env files

Change out the values in <> by your own.

In the project root directory, add the following file, called .env.dev

DEBUG=1
SECRET_KEY=<any secret key string>
DJANGO_ALLOWED_HOSTS='localhost 127.0.0.1 [::1] django'
SQL_ENGINE=django.db.backends.postgresql
SQL_DATABASE=<any database name>
SQL_USER=<any username>
SQL_PASSWORD=<any chosen password>
SQL_HOST=db
SQL_PORT=<any port number between 1024 and 65535>
DATABASE=postgres
DJANGO_SUPERUSER_PASSWORD=<any password, used for django admin panel>
DJANGO_SUPERUSER_EMAIL=<any email, used for django admin panel>

In the frontend directory, add the following file, called .env.local

NEXTAUTH_URL_INTERNAL=http://next:3000/next/auth
NEXTAUTH_SECRET=<any secret key string>
NEXT_PUBLIC_GOOGLE_API=<a key for the google maps embed API>
NEXT_PUBLIC_API_URL=http://localhost:8000/api/

2. Start and build docker containers

  • Navigate to the project root
  • Run docker-compose up -d --build

Surf to localhost:3000 and localhost:8000 to check if everything is working.

This will do the following things:

  • Start django in development mode
  • Init and start the postgres database
  • Start Next.js in development mode
  • Make any migrations
  • Create a superuser with login [email protected] and password admin
  • Automatically update if any changes are made to the code