Skip to content

Commit

Permalink
[skip ci] Update readme + add env templates
Browse files Browse the repository at this point in the history
  • Loading branch information
No767 committed Oct 9, 2023
1 parent 76ecfe2 commit c0f6cf5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ Unlike other frameworks, discord.py does not automatically sync slash commands (
r>sync 1235
```

### PG Setup
If you want to run postgres on an docker compose stack,
then all you need to do is to make an `.env` file in the root of the repo,
and add these:

```bash
POSTGRES_PASSWORD=password
POSTGRES_USER=user
POSTGRES_DB=user
```

The values above set up the root postgres user. Ideally you will want to make an new user, which can be done like so:

```sql
CREATE ROLE rodhaj WITH LOGIN PASSWORD 'somepass';
CREATE DATABASE rodhaj OWNER rodhaj;
```

### Setup Instructions

Expand All @@ -30,9 +47,6 @@ You must have these installed:
- Git
- PostgreSQL

In order to run pg in a docker container, spin up the docker compose file
located in the root of the repo (`sudo docker compose up -d`).

1. Clone the repo or use it as a template.
2. Copy over the ENV file template to the `bot` directory

Expand Down
9 changes: 9 additions & 0 deletions envs/dev.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Paste your bot's token here
TOKEN=token

# For development purposes, set this to True
# IF YOU ARE RUNNING A PRODUCTION BUILD, SET THIS TO False!!
DEV_MODE=True

# PostgreSQL URI string
POSTGRES_URI=postgresql://user:password@localhost:5432/user

0 comments on commit c0f6cf5

Please sign in to comment.