Install Postgres
sudo apt update
sudo apt install postgresql
Configure Postgres
sudo -u postgres psql
CREATE DATABASE asbwig;
create user asbwig with encrypted password 'password';
grant all privileges on database asbwig to asbwig;
\c asbwig
grant usage, create on schema public to asbwig;
\q
Add your environment variables to your ~/.profile
ASBWIG_TOKEN
- Your bot token. NOT prefixed with "Bot"
ASBWIG_PGUSERNAME
- The user in postgres you created
ASBWIG_PASSWORD
- The password you set in postgres
Prefix each variable with export
:
export ASBWIG_TOKEN="tokenxxxx"
Downloading and installing
sudo apt update
sudo apt install git
git clone https://github.com/RhykerWells/asbwig
cd asbwig/cmd/asbwig
go build
Once it has finished compiling. Run the binary with:
./asbwig
Update your system and install git
sudo apt update
sudo apt install git
Clone the repository
git clone https://github.com/RhykerWells/asbwig
cd asbwig/docker
Copy the environment variable files and edit where applicable
cp app.example, app.env
cp db.example, db.env
Add your docker image to the compose file
docker compose up -d