Skip to content

Docker πŸ‹ ​

Docker is the preferred way to run AdventureLog on your local machine. It is a lightweight containerization technology that allows you to run applications in isolated environments called containers.

Note: This guide mainly focuses on installation with a Linux-based host machine, but the steps are similar for other operating systems.

Prerequisites ​

  • Docker installed on your machine/server. You can learn how to download it here.

Getting Started ​

Get the docker-compose.yml and .env.example files from the AdventureLog repository. You can download them here:

bash
wget https://raw.githubusercontent.com/seanmorley15/AdventureLog/main/docker-compose.yml
wget https://raw.githubusercontent.com/seanmorley15/AdventureLog/main/.env.example
cp .env.example .env

TIP

If running on an ARM based machine, you will need to use a different PostGIS Image. It is recommended to use the tobi312/rpi-postgresql-postgis:15-3.3-alpine-arm image or a custom version found here. The AdventureLog containers are ARM compatible.

Configuration ​

The .env file contains all the configuration settings for your AdventureLog instance. Here’s a breakdown of each section:

🌐 Frontend (web) ​

NameRequiredDescriptionDefault Value
PUBLIC_SERVER_URLYesUsed by the frontend SSR server to connect to the backend. Almost every user user will never have to change this from default!http://server:8000
ORIGINSometimesNeeded only if not using HTTPS. Set it to the domain or IP you'll use to access the frontend.http://localhost:8015
BODY_SIZE_LIMITYesMaximum upload size in bytes.Infinity
FRONTEND_PORTYesPort that the frontend will run on inside Docker.8015

🐘 PostgreSQL Database ​

NameRequiredDescriptionDefault Value
PGHOSTYesInternal DB hostname.db
POSTGRES_DBYesDB name.database
POSTGRES_USERYesDB user.adventure
POSTGRES_PASSWORDYesDB password.changeme123

πŸ”’ Backend (server) ​

NameRequiredDescriptionDefault Value
SECRET_KEYYesDjango secret key. Change this in production!changeme123
DJANGO_ADMIN_USERNAMEYesDefault Django admin username.admin
DJANGO_ADMIN_PASSWORDYesDefault Django admin password.admin
DJANGO_ADMIN_EMAILYesDefault admin email.admin@example.com
PUBLIC_URLYesPublicly accessible URL of the backend. Used for generating image URLs.http://localhost:8016
CSRF_TRUSTED_ORIGINSYesComma-separated list of frontend/backend URLs that are allowed to submit requests.http://localhost:8016,http://localhost:8015
FRONTEND_URLYesURL to the frontend, used for email generation.http://localhost:8015
BACKEND_PORTYesPort that the backend will run on inside Docker.8016
DEBUGNoShould be False in production.False

Optional Configuration ​

Running the Containers ​

Once you've configured .env, you can start AdventureLog with:

bash
docker compose up -d

Enjoy using AdventureLog! πŸŽ‰

AdventureLog