Skip to content

Commit

Permalink
Add documentation for hosting CDN content on a dev environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
lyuma committed Apr 9, 2024
1 parent c716d93 commit 304749b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,30 @@ Note that `bcrypt_elixir` will require a working compiler in the PATH. On a Wind
## Log into Cockroachdb sql shell

`./cockroach sql --database="uro_dev" --insecure`

You may approve all pending email verifications using:

```
update users set email_confirmation_token=null, email_confirmed_at=NOW() where true;
```

And you can grant upload privileges for all users using
```
update user_privilege_rulesets set can_upload_avatars=true, can_upload_maps=true, can_upload_props=true where true;
```

Finally, to enable admin access for a specific user id:
```
update user_privilege_rulesets set is_admin=true where user_id = '12345678-abcd-...';
```

## Host local CDN for testing

By default, the `dev` environment will store assets in `priv/waffle/private` directory, and the client expects this to be available on port 80. To serve the CDN content on port 80:

```
cd priv/waffle/private
python -m http.server 80
```

Windows allows any user to serve port 80 by default, but on other operating systems the above should be run with sudo.

0 comments on commit 304749b

Please sign in to comment.