Skip to content

Commit

Permalink
Prototype new install docs (#608)
Browse files Browse the repository at this point in the history
* Document procedure for "stable" branch release

* Add instructions for cloudflare certbot setup

* add link to the example config file (#635)

* Add basic nginx setup directives
  • Loading branch information
RAnders00 authored and pajlada committed Nov 9, 2019
1 parent 1a2e37c commit 2ef6c26
Show file tree
Hide file tree
Showing 20 changed files with 566 additions and 313 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -20,6 +20,7 @@ config.ini
/*.ini
!uwsgi_cache.ini
!uwsgi_shared.ini
!configs/example.ini

# User created code
userdispatch.py
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -123,7 +123,7 @@ Remember to bring your dependencies up to date with `./scripts/venvinstall.sh` w
- Activate the python virtualenv: `source venv/bin/activate`
- Run `./scripts/migrate-mysql-to-postgresql` to move the data
- Update the `sql` connection string in your bot config (see the updated
[example config](./install-docs/debian10/kkonatestbroadcaster.ini) for
[example config](./configs/example.ini) for
examples)
- Start pajbot again:
`sudo systemctl start pajbot@streamername pajbot-web@streamername`
Expand Down
9 changes: 3 additions & 6 deletions README.md
Expand Up @@ -5,13 +5,10 @@ pajbot is a twitch chat bot created by [pajlada](http://twitch.tv/pajlada).

## Quick install

1. Install library requirements by typing `./scripts/venvinstall.sh` in
the root folder
2. Copy `./install-docs/debian10/kkonatestbroadcaster.ini` to `./config.ini` and
change the relevant lines in the file.
1. Install library requirements by typing `./scripts/venvinstall.sh` in the root folder
2. Copy `./configs/example.ini` to `./config.ini` and change the relevant lines in the file.
3. Run the bot! `./main.py`

## Detailed install

You can find a detailed installation guide for **pajbot** in the
[`install-docs` directory](./install-docs) of this repository.
You can find a detailed installation guide for **pajbot** in the [`install-docs` directory](./install-docs) of this repository.
109 changes: 109 additions & 0 deletions configs/example.ini
@@ -0,0 +1,109 @@
[main]
; Twitch login name of the bot account
nickname = the_bot_name
; Twitch login name of the channel the bot runs in
streamer = streamer_name
; display name of the primary admin (will be granted level 2000 initially)
admin = your_own_name
; an additional channel the bot will join and receive commands from. (login name)
; You can remove this config entry if you don't want to use this feature
control_hub = a_channel_for_all_your_bots_to_join
; URL to specify how to connect to the PostgreSQL database server.
; See here for available options:
; https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
; https://docs.sqlalchemy.org/en/13/dialects/postgresql.html#module-sqlalchemy.dialects.postgresql.psycopg2
; Note on the weird urlencoding for search_path: the argument is (if written differently:)
; args = { "options": "-c search_path=pajbot1_kkonatestbroadcaster" }, which after urlencoding has `%20` instead of
; space characters. Because the config parser interprets the % character to begin a substitution
; for an environment variable, the % characters are doubled so they are interpreted
; as literal % signs.
; https://docs.python.org/3/library/configparser.html#interpolation-of-values
db = postgresql+psycopg2:///pajbot?options=-c%%20search_path%%3Dpajbot1_streamer_name
; set this to 1 if your bot is a verified bot (increased rate limits) on Twitch
; More info about verified bots can be found here: https://dev.twitch.tv/docs/irc/guide#known-and-verified-bots
;verified = 1

; Optional section if you want to make the "Wolfram Alpha Query" module available for use:
; Set this to a valid Wolfram|Alpha App ID to enable wolfram alpha query functionality
; (You can get this from http://developer.wolframalpha.com/portal/myapps/ - Click "Get an AppID")
;wolfram = ABCDEF-GHIJKLMNOP
; this location/ip is used to localize the queries to a default location.
; https://products.wolframalpha.com/api/documentation/#semantic-location
; if you specify both IP and location, the location will be ignored.
;wolfram_ip = 62.41.0.123
;wolfram_location = Amsterdam

[web]
; List of "features" you want to enable to be displayed on the website (separated by space)
; - "linefarming" adds a statistic of the top 5 chatters to the statistics page
; - "pleblist" adds a link to the pleblist to the top navigation bar
; - "playsounds" adds a link to the playsounds page to the top navigation bar
; - "predict" adds a link to the admin panel of the "Prediction of Arena Wins" module to the admin area.
; - "duels" adds a link to the duel statistics to the statistics page
modules = linefarming duels playsounds
; Capitalized name of the streamer (their display name)
streamer_name = Streamer_Name
; domain that the website runs on
domain = streamer_name.your-website.com
; This setting is for if you are using the "Decks (Hearthstone)" module - If you set this to 0,
; the classes will be named by their name, if you set this to 1, an image representing the class
; will be displayed instead.
;deck_tab_images = 1
; this configures which version of the subscriber badge to download for the streamer to be shown on the website next to subscribers
; the default value is 0 (default sub badge)
; value of -1 disables the subscriber badge downloading entirely
; https://badges.twitch.tv/v1/badges/channels/11148817/display?language=en example url to see valid badge versions, replace 11148817 with your twitch user id to see your badges
subscriber_badge_version = 12

; phrases the bot prints when it starts up and exits
[phrases]
welcome = {nickname} {version} running!
quit = {nickname} {version} shutting down...
; optional: you can make the bot print multiple messages on startup/quit,
; for example a common use for this might be to turn subscribers-only/emote-only/etc.. mode on when the bot is quit
; and to turn it back off once it's back.
; e.g.: (notice the indentation)
;welcome = {nickname} {version} running!
; .emoteonlyoff
;quit = .emoteonly
; {nickname} {version} shutting down...

; client_id used for both the bot and the web login
[twitchapi]
client_id = 0f958ce6bf20ba8ea84a21e43ebba1
client_secret = cdaa2b0832ccd5b1f053f2faffc37f
redirect_uri = https://streamer_name.your-website.com/login/authorized

; you can optionally populate this with twitter access tokens
; if you want to be able to interact with twitter.
[twitter]
consumer_key = abc
consumer_secret = abc
access_token = 123-abc
access_token_secret = abc
; streaming=0/1 configures whether the bot should print a chat message when a new tweet comes in from
; a user we are following
streaming = 1

[flags]
; You can set this to 1 to silence the bot - In that mode, it will not print messages to chat (except for on startup/quit).
silent = 0
; Enables a more verbose version info, and enables you (the bot admin) to run arbitrary python commands via `!eval` from chat.
dev = 0

[websocket]
enabled = 1
; Unix socket the websocket server listens on
unix_socket = /var/run/pajbot/streamer_name/websocket.sock
; This should be the URI the web socket can be reached at from outside
host = wss://streamer_name.your-domain.com/clrsocket

; If you are planning to use the pleblist system: This is the YouTube API key the bot should use.
; If you don't plan on using the pleblist, you can leave this as the default value like below.
[youtube]
developer_key = abc

; information about you, the maintainer and host of this bot. will be shown on the /contact page
[maintainer]
name = KKonaTestAdmin
contact_string = You can contact me over at <a href="https://KKonaTestAdmin.se/contact">CONTACT LINK</a>
1 change: 1 addition & 0 deletions docs/MAKE-RELEASE.md
Expand Up @@ -10,3 +10,4 @@

- Tag the release: `git tag YOUR.VERSION -am "YOUR.VERSION"`
- Push the tag: `git push --tags`
- Update the `stable` branch to point to the new release: `git fetch . your.version:stable`
21 changes: 0 additions & 21 deletions install-docs/LICENSE

This file was deleted.

0 comments on commit 2ef6c26

Please sign in to comment.