GithubHelp home page GithubHelp logo

foundryvtt-swag-vouch's Introduction

FoundryVTT + docker + swag (nginx, certbot), vouch-proxy + discord-oauth

initial setup

I started with marcwagner instructions to get foundry configured in a container on a virtual private server. I saw eltariel's repo adding oauth to it.

Plan:

  1. to finish this so it is reusable for anyone. (clone this repo. run a script, enter config items, complete!)
  2. create a linode stackscript to be have a repeatable deployment from zero to hosted instance (plus dns propagation time).

build containers

Edit foundry-vtt download url in Dockerfile

$ sudo docker -v build -t foundry-vtt .

run container

$ sudo docker run -d --name=<name> -p <host-port>:30000 -v <fvtt data dir>:/home/foundry/data foundry-with-plutonium

nginx Reverse Proxy

Outline

Site Template

LetsEncrypt

$ sudo certbot certonly --webroot -d vouch.foundry.eltariel.com --email [email protected] -w /var/www/_letsencrypt -n --agree-tos --force-renewal

OAuth2 via Dicsord

References: nginx vouch setup, using oidc with discord

$ sudo cp vouch-config.yml /etc/nginx/vouch/config.yml
$ sudo docker run -d --name vouch -v /etc/nginx/vouch:/config -p 9090:9090 voucher/vouch-proxy:alpine

FoundryVTT login flow

As written

GET /join
  -> form with dropdown of available users

Fill in details & submit:

POST /join multipart/form-data 
	"userid": "mlDlYBmmRo7vPZsJ"
	"password": ""
  -> JSON
	{
	  "response": "success" or "error",
	  "error": "something?",
	  "redirect": "/game"
	}

GET /game

Inserting oauth2 mapping

landing page:

GET /
  -> Requires oauth2
  -> lists games available to you with allowed characters

Click a character name:
  -> if game server not running, launch it
  -> start at POST above

foundryvtt-swag-vouch's People

Contributors

eltariel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.