Skip to content

Latest commit

 

History

History
108 lines (73 loc) · 2.64 KB

README.md

File metadata and controls

108 lines (73 loc) · 2.64 KB

WaterWolf Site

This is the WaterWolf Website

Production

This repository is deployed to remote servers via the Docker image it builds as part of its GitHub Actions CI suite.

See Dockerfile for the build details, and the .github folder for the GitHub Actions details.

Development

Live Development Site

Live dev website can be found https://dev.waterwolf.club

Developing Locally

Developers running Docker Desktop for Windows or MacOS or Docker for Linux can take advantage of the built-in support for Docker and Docker Compose.

A Makefile also exists to allow easy shorthand access to common commands. You should have make installed on your host OS to take advantage of this file, but all instructions are provided in both formats.

Initial Setup

Copy dev.dist.env to dev.env and update it with any missing secrets.

Update PUID and PGID to your local user/group ID respectively (the values of id -u and id -g) to ensure permissions match correctly.

The database will be created from the DB migrations (in /db/migrations) on initial startup.

The following user accounts are created on local dev, all with the password WaterWolf!:

UID Username E-mail Address
1 User [email protected]
2 TeamMember [email protected]
3 Moderator [email protected]
4 Admin [email protected]
5 Banned [email protected]

Building the Base Image

docker-compose build
# Or
make build

Spinning Up Containers

docker-compose up -d
# Or
make up

Your local instance will be available at https://localhost:8080.

Stopping Containers

docker-compose down
# Or
make down

To spin down all containers and permanently delete volumes (like DB data), run:

docker-compose down -v

Accessing Bash Shell Inside Container

As the app user:

docker-compose exec --user=app web bash
# Or
make bash

As the root user:

docker-compose exec --user=app web bash
# Or
make bash-root

Asset Hosting

Static assets used by the web site are stored inside this repository and can be referenced directly via /static links.

User-uploaded content is stored in /web/media/site in local development and in a Cloudflare R2 repository in production, which resolves to uploads.waterwolf.club.

uploads.waterwolf.club structure:

img/
  djs/ # DJ Avatars
  posters/ # Posters
  profile/ # Main Avatars
  worlds/ # World screenshots