Skip to content

Commit

Permalink
Improve README deploy instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
david-sharer committed Apr 12, 2024
1 parent 37200d2 commit 4beacc2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ All commands are performed by mentioning `@rollem` in server chat, and without p
1. You will need [Docker](https://www.docker.com/get-started)
2. Create database with `docker-compose up database`
3. Initialize the database
1. `cd packages/common` to get to the common code directory
2. `yarn run typeorm schema:sync` to sync the TypeORM schema
1. `cd packages/common` to get to the common code directory
2. `yarn install`
3. `yarn run typeorm schema:sync` to sync the TypeORM schema

- You may have to repeat these steps when the schema changes
- Clear the database with `docker-compose down database` and then `docker-compose up database`
Expand Down Expand Up @@ -205,10 +206,19 @@ These are incomplete and are a massive pain on Windows anyway.

## Deploying the Bot

Summary
* [rollem-discord on docker hub](https://hub.docker.com/r/lemtzas/rollem-discord/).
* Set the `DISCORD_BOT_USER_TOKEN` environment variable to your token from [discord's applications page](https://discordapp.com/developers/applications/me).
* The docker hub will automatically update with the latest commits on `master`.

### Simple Deploy (no storage)

1. Required tools
1. [Docker](https://www.docker.com/get-started)
3. Start the bot
1. Configure the values in `compose.yaml`
2. run `docker-compose up rollem` in the root directory

## Publishing

Run one of the following; Follow [semver](http://semver.org/):
Expand Down
16 changes: 16 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ services:
POSTGRES_PASSWORD: local
POSTGRES_USER: rollem-dev
POSTGRES_DB: rollem-dev

database-persist:
image: postgres
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: local
POSTGRES_USER: rollem-dev
POSTGRES_DB: rollem-dev
volumes:
- ./database:/var/lib/postgresql

rollem:
image: lemtzas/rollem-discord
environment:
DISCORD_BOT_USER_TOKEN: <your bot token goes here>
# frontend:
# image: awesome/webapp
# ports:
Expand Down

0 comments on commit 4beacc2

Please sign in to comment.