/rolldex

Primary LanguageTypeScript

Rolldex

A system for keeping notes on tabletop RPG campaigns.

Local dev prep

Global dependencies

Database setup

  1. Switch to the default postgres user: sudo -u postgres -i
  2. Follow the instructions here for getting a basic Postgres DB setup, just make sure to name the database "rpgr_dev".
  • To make tests work you'll need to create another database called "rpgr_test" as well.
  1. mix ecto.setup

Secrets

  1. Under ./config add dev.secret.exs and test.secret.exs file with the following contents:
use Mix.Config

config :rpgr, Rpgr.Repo,
adapter: Ecto.Adapters.Postgres,
username: "<ADD THE USERNAME YOU ARE USING FOR YOUR LOCAL POSTGRES INSTANCE HERE>",
password: "<ADD THE PASSWORD YOU SET UP HERE>",
database: "rpgr_<EITHER dev OR test TO MATCH THE FILE>",
hostname: "localhost",
pool_size: 10
  1. Add GUARDIAN_ROLLDEX_SECRET_KEY to your zshrc/bashrc file (not sure if it needs to be something specific or not...)

Local Dependencies

  • Run mix deps.get and allow it to install Hex when prompted
  • Navigate to ./priv/assets and run npm install

Local dev

  • From the root rolldex directory run mix phx.server
  • In a different terminal, navigate to the ./priv/assets directory and run npm start
  • Go to http://localhost:3000
    • If this is your first time running it, go to the register page and sign up with your email (note: it must be approved).

Deployment

If you aren't me you probably don't have authorization to deploy. So maybe just ask me to deploy.

Prep

  1. Install Python3 & Pip3
  2. Install the Gigalixir CLI
  3. Run gigalixir login
  4. gigalixir git:remote <GIGALIXIR_APP_NAME>

How to deploy

  1. git push gigalixir master
  2. Wait as it takes a long time to build