Initial readme, minor formatting changes.
This commit is contained in:
parent
8ab883d0b9
commit
d4fd8c9519
3 changed files with 52 additions and 29 deletions
19
README.md
19
README.md
|
@ -0,0 +1,19 @@
|
|||
# Werefox Discord Bot
|
||||
|
||||
This is a Discord bot I've made in Python to use for the Discord server I'm putting together for my streams.
|
||||
|
||||
## Setup
|
||||
|
||||
Right now I've only tested the bot in a Docker container. The following command will build the container from the `Dockerfile` incuded and then run it.
|
||||
|
||||
`sudo docker-compose up --build --force-recreate --remove-orphans -d`
|
||||
|
||||
If you wish to simply run the container without re-building it, you can remove the `--build` and `--force-recreate` tags.
|
||||
|
||||
`sudo docker-compose up --remove-orphans -d`
|
||||
|
||||
Additionally, in most cases, `--remove-orphans` is not strictly necessary.
|
||||
|
||||
## Usage
|
||||
|
||||
_TODO: This section should probably point to a wiki of commands and such..._
|
|
@ -1,30 +1,30 @@
|
|||
---
|
||||
version: "3"
|
||||
services:
|
||||
werefox-discord-bot:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: werefox-discord-bot:latest
|
||||
container_name: wdb_container_service
|
||||
restart: always
|
||||
links:
|
||||
- postgres
|
||||
volumes:
|
||||
- ./volumes/python/lib:/home/werefox/lib
|
||||
- ./volumes/python/data:/home/werefox/data
|
||||
postgres:
|
||||
image: postgres:13
|
||||
restart: always
|
||||
ports:
|
||||
- 8131:8131
|
||||
volumes:
|
||||
- ./volumes/postgres/pg_data:/var/lib/postgresql/data/pg_data
|
||||
- ./volumes/postgres/config:/config
|
||||
environment:
|
||||
POSTGRES_PASSWORD_FILE: /config/pgdb.key
|
||||
POSTGRES_DB: werefox_prod
|
||||
POSTGRES_USER: werefox
|
||||
POSTGRES_HOST: localhost
|
||||
POSTGRES_PORT: 8131
|
||||
PGDATA: /var/lib/postgresql/data/pg_data
|
||||
werefox-discord-bot:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: werefox-discord-bot:latest
|
||||
container_name: wdb_container_service
|
||||
restart: always
|
||||
links:
|
||||
- postgres
|
||||
volumes:
|
||||
- ./volumes/python/lib:/home/werefox/lib
|
||||
- ./volumes/python/data:/home/werefox/data
|
||||
postgres:
|
||||
image: postgres:13
|
||||
restart: always
|
||||
ports:
|
||||
- 8131:8131
|
||||
volumes:
|
||||
- ./volumes/postgres/pg_data:/var/lib/postgresql/data/pg_data
|
||||
- ./volumes/postgres/config:/config
|
||||
environment:
|
||||
POSTGRES_PASSWORD_FILE: /config/pgdb.key
|
||||
POSTGRES_DB: werefox_prod
|
||||
POSTGRES_USER: werefox
|
||||
POSTGRES_HOST: localhost
|
||||
POSTGRES_PORT: 8131
|
||||
PGDATA: /var/lib/postgresql/data/pg_data
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/python
|
||||
|
||||
from lib.werefox_bot_runtime import run
|
||||
from asyncio import sleep, run
|
||||
try:
|
||||
from volumes.python.lib.werefox_bot_runtime import run as werefox_run
|
||||
except:
|
||||
from lib.werefox_bot_runtime import run as werefox_run
|
||||
|
||||
run()
|
||||
werefox_run()
|
||||
|
|
Reference in a new issue