Skip to content

Easy, Docker-driven Destiny.gg dev environment

Notifications You must be signed in to change notification settings

11k/dockerstiny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dockerstiny

A collection of Dockerfiles and config files that enable you to easily run Destiny.gg (website and chat) locally on your computer for development purposes. Tested on macOS, Linux, and Windows (via Linux on WSL2).

Requirements

Instructions

  1. Download/install the requirements above. If using Linux on WSL2, mkcert must be installed on Windows. See the additional Windows mkcert instructions below.
  2. Clone this repo.
git clone https://github.com/11k/dockerstiny.git
  1. Navigate into the project folder.
cd dockerstiny
  1. Use mkcert to create and install a locally-trusted certificate authority.
mkcert -install
  1. Generate a certificate and private key.
mkcert -cert-file docker/nginx-certs/dgg.pem -key-file docker/nginx-certs/dgg-key.pem localhost 127.0.0.1 host.docker.internal
  1. Copy the CA certificate created by mkcert into ca-certs.
cp "$(mkcert -CAROOT)/rootCA.pem" docker/ca-certs/
  1. Clone destinygg/website-private, destinygg/chat-private, destinygg/chat-gui, and destinygg/live-ws into dockerstiny.
git clone [email protected]:destinygg/website-private.git website
git clone [email protected]:destinygg/chat-private.git chat
git clone [email protected]:destinygg/chat-gui.git
git clone [email protected]:destinygg/live-ws.git
  1. Copy the included website and chat config files to the appropriate locations.
cp docker/website-config/config.local.php website/config/
cp docker/website-config/.env website/.env
cp docker/chat-config/settings.cfg chat/
cp docker/live-ws-config/.env live-ws/.env
  1. Install all Node.js dependencies for the chat frontend.
cd chat-gui
npm ci
  1. Install the website's dependencies.
cd ../website
npm ci
  1. Link the local copy of chat-gui rather than using the version installed from the npm registry.
npm link ../chat-gui
  1. Generate the site's static assets.
npm run build
  1. Head back into the project folder and build/run. This command will take some time.
cd ..
docker-compose --profile dev up
  1. Run migrations to initialize the database.
docker compose --profile dev exec website vendor/bin/doctrine-migrations migrations:migrate -q
  1. Access the site via https://localhost:8080.
  2. Go to https://localhost:8080/impersonate?username=admin to log in as the admin.

Windows mkcert Instructions

  1. Download the latest release of mkcert from the project's releases page on GitHub. The version you need ends with "-windows-amd64.exe".
  2. Open Command Prompt.
  3. Navigate into the directory that contains the mkcert executable you just downloaded, likely Downloads.
cd %HOMEPATH%\Downloads
  1. Create and install a locally-trusted certificate authority. Your executable may have a slightly different name.
mkcert-v1.4.3-windows-amd64.exe -install
  1. Generate a certificate and private key.
mkcert-v1.4.3-windows-amd64.exe -cert-file dgg.pem -key-file dgg-key.pem localhost 127.0.0.1 host.docker.internal
  1. Copy the generated files to the appropriate location. This can be done from within WSL2 by utilizing wslvar and wslpath.
cp $(wslpath "$(wslvar HOMEDRIVE)$(wslvar HOMEPATH)")/Downloads/dgg* docker/nginx-certs
  1. Do the same with the CA certificate.
cp $(wslpath "$(mkcert-v1.4.3-windows-amd64.exe -CAROOT)\rootCA.pem") docker/ca-certs/

About

Easy, Docker-driven Destiny.gg dev environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages