Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Autostart and Reloading #47

Closed
ghost opened this issue Jan 29, 2018 · 3 comments
Closed

Autostart and Reloading #47

ghost opened this issue Jan 29, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Jan 29, 2018

We need an init script or something of the sort that we can enable to auto-start the bot on boot, and to reload the bot when code changes. That way we can cron a "git pull master" and have auto-updates work smoothly

Nodemon:
https://www.npmjs.com/package/nodemon
remy/nodemon#1176

Node service init.d creator:
https://www.npmjs.com/package/node-service-linux

PM2, could run a script that runs nodemon:
http://pm2.keymetrics.io/docs/usage/quick-start/

Could shorten this:
https://github.com/chovy/node-startup/blob/master/init.d/node-app

@ghost ghost added bug usability labels Jan 29, 2018
@ghost ghost mentioned this issue Feb 2, 2018
@ghost ghost changed the title Nodemon Autostart and Reloading Autostart and Reloading Mar 15, 2018
@ghost
Copy link
Author

ghost commented Mar 15, 2018

Alrighty then. Pi is stuck with systemd, but any number of other systems might use init scripts, and the pi systemd scripts basically all call init scripts because #bandaidislife, so we're doing both.

Note to self after hours of systemd research and some good beer: This is a great bare-bones systemd guide http://nodesource.com/blog/running-your-node-js-app-with-systemd-part-1/

@ghost
Copy link
Author

ghost commented Mar 15, 2018

This allows a much easier time of ensuring #38 while we're at it

ghost pushed a commit that referenced this issue Mar 15, 2018
* Nuke old daemon script
* Service dir with test scripts for running live - progress on #38 and #47
@ghost ghost added this to the TavernBot 1.0 milestone Mar 15, 2018
@ghost
Copy link
Author

ghost commented Mar 17, 2018

Nodemon is not the right tool here. Stripped it as a dependency, will add it later as a dev-dependency.

This is officially fixed, and works for old versions of systemd. That system has been around forever, and I won't support any non-linux setup with this thing (though node does a good job of covering many bases) - so we're done here.

@ghost ghost closed this as completed Mar 17, 2018
@ghost ghost mentioned this issue Mar 18, 2018
ghost pushed a commit that referenced this issue Mar 21, 2018
* Nuke old daemon script
* Service dir with test scripts for running live - progress on #38 and #47
jakethedev pushed a commit that referenced this issue Jul 6, 2018
# The first commit's message is:

# This is a combination of 2 commits.
# The first commit's message is:

# This is a combination of 2 commits.
# The first commit's message is:

# This is a combination of 3 commits.
# The first commit's message is:
# This is a combination of 5 commits.
# The first commit's message is:
# This is a combination of 5 commits.
# The first commit's message is:
# This is a combination of 2 commits.
# The first commit's message is:

# This is a combination of 3 commits.
# The first commit's message is:
# This is a combination of 3 commits.
# The first commit's message is:
# This is a combination of 9 commits.
# The first commit's message is:
# This is a combination of 4 commits.
# The first commit's message is:
# This is a combination of 2 commits.
# The first commit's message is:

# This is a combination of 2 commits.
# The first commit's message is:

# This is a combination of 3 commits.
# The first commit's message is:
# This is a combination of 3 commits.
# The first commit's message is:
# This is a combination of 3 commits.
# The first commit's message is:
# This is a combination of 2 commits.
# The first commit's message is:

# This is a combination of 2 commits.
# The first commit's message is:

# This is a combination of 14 commits.
# The first commit's message is:
# This is a combination of 3 commits.
# The first commit's message is:
# This is a combination of 2 commits.
# The first commit's message is:

# This is a combination of 2 commits.
# The first commit's message is:

# This is a combination of 45 commits.
# The first commit's message is:
Test commit

# The 2nd commit message will be skipped:

#	Test

# The 3rd commit message will be skipped:

#	Init a basic random lib, it can roll dice now. Starting point for the actual bot

# The 4th commit message will be skipped:

#	Framed bit of json for config

# The 5th commit message will be skipped:

#	Adding general todo, this will likely form up as github issues

# The 6th commit message will be skipped:

#	Adding more sources of dice rollers

# The 7th commit message will be skipped:

#	More todo info

# The 8th commit message will be skipped:

#	Adding package.json

# The 9th commit message will be skipped:

#	Started rolling

# The 10th commit message will be skipped:

#	Initial code bits for bot. Nuked python unnecessary stuff, tweaked a couple files to fit node stuff better. Still needs some conversion

# The 11th commit message will be skipped:

#	Initial setup for various commands

# The 12th commit message will be skipped:

#	Tweak todo

# The 13th commit message will be skipped:

#	Basic framework for mvp fleshed out, function stubs for catarns ranks, dice hella simplified.

# The 14th commit message will be skipped:

#	Converted adventure generator to node!

# The 15th commit message will be skipped:

#	Last tweaks and it works

# The 16th commit message will be skipped:

#	Fixed name, hooked into bot

# The 17th commit message will be skipped:

#	Lots of bot updates, runs for sure and works on a default channel and DMs. Easily configurable for now, will be easier to configure later

# The 18th commit message will be skipped:

#	Tweak to bot, added tons of boilerplate to roleslib that should make it trivial to build up mvp

# The 19th commit message will be skipped:

#	Adding link to roles

# The 20th commit message will be skipped:

#	Adding a bunch of python templates

# The 21st commit message will be skipped:

#	Update README.md

# The 22nd commit message will be skipped:

#	Overhaul with spellbook and monster SRD added, all custom libs renamed to better things.

# The 23rd commit message will be skipped:

#	Several tweaks and fixed. Huge update to adventuregen, we now have a skeleton for multisetting support. WOO

# The 24th commit message will be skipped:

#	Updating libs to use new and easier export structure, tiny tweak to default config

# The 25th commit message will be skipped:

#	Fixed the rest of the exports, this should make it easy to set everything up as one library. Bot updated to use new api

# The 26th commit message will be skipped:

#	Tweaks on input parsing to make sure we're handling it right

# The 27th commit message will be skipped:

#	Comments and a final input tweak

# The 28th commit message will be skipped:

#	Added a bit of example code for iterating exports to find a function

# The 29th commit message will be skipped:

#	Nix todo, keeping that elsewhere - switch to a notepad

# The 30th commit message will be skipped:

#	The first semblance of testing and proper npm script handling

# The 31st commit message will be skipped:

#	Update default config structure

# The 32nd commit message will be skipped:

#	Cleaning up config items in bot.js

# The 33rd commit message will be skipped:

#	Refactored for easy function addition, so now we go on to building the discord lib

# The 34th commit message will be skipped:

#	Init tavernlib's package.json, will take it out eventually and kick it to NPM

# The 35th commit message will be skipped:

#	Updating package for nodemon

# The 36th commit message will be skipped:

#	Basic testing complete, npm run test will fire off a series of mock messages against all current functions of rpg lib

# The 37th commit message will be skipped:

#	Tiny tweak

# The 38th commit message will be skipped:

#	Tweak to bot output

# The 39th commit message will be skipped:

#	Updating readme.

# The 40th commit message will be skipped:

#	Update README.md

# The 41st commit message will be skipped:

#	Moved notes to Readme, quick peruse through NPM for info on active rpg utils

# The 42nd commit message will be skipped:

#	Removing package lock

# The 43rd commit message will be skipped:

#	Tweak to readme

# The 44th commit message will be skipped:

#	Merge from Dev
#
#	Readmes, a rename, and a couple basic tweaks
#
#	Commit log:
#
#	* Update README.md (#7)
#
#	* Updating package json
#
#	* The bot shall be TavernBot! And the rpg-catchall shall be the dungeonary, like a dungeon dictionary!
#
#	* Readme tweak
#
#	* Renaming everything to tavernbot
#
#	* Package tweak
#
#	* Locking in the npm registry key, we've published tavernbot and dungeonary to npm - this closes #5
#
#	* Test
#
#	* Updating readmes and tavernbot package file
#
#	* Version bump for docs
#
#	* formatting
#
#	* a space of formatting
#
#	* Better coin message

# The 45th commit message will be skipped:

#	Initial Setup for Deploy
#
#	Here we go... Below is the super useful commit log
#
#	* Update README.md (#7)
#
#	* Updating package json
#
#	* The bot shall be TavernBot! And the rpg-catchall shall be the dungeonary, like a dungeon dictionary!
#
#	* Readme tweak
#
#	* Renaming everything to tavernbot
#
#	* Package tweak
#
#	* Locking in the npm registry key, we've published tavernbot and dungeonary to npm - this closes #5
#
#	* Test
#
#	* Updating readmes and tavernbot package file
#
#	* Version bump for docs
#
#	* formatting
#
#	* a space of formatting
#
#	* Better coin message
#
#	* Tweak to bot and test output, logging timestamps now. Roles stubs cleaned up and template-ized
#
#	* Ignore python stuff cus it's not part of this project
#
#	* Package lock and service idea
#
#	* Updated run scripts and gitignore

# The 2nd commit message will be skipped:

#	Updating package json

# The 2nd commit message will be skipped:

#	Locking in the npm registry key, we've published tavernbot and dungeonary to npm - this closes #5

# The 2nd commit message will be skipped:

#	Test

# The 3rd commit message will be skipped:

#	Version bump for docs

# The 2nd commit message will be skipped:

#	a space of formatting

# The 3rd commit message will be skipped:

#	Better coin message

# The 4th commit message will be skipped:

#	Tweak to bot and test output, logging timestamps now. Roles stubs cleaned up and template-ized

# The 5th commit message will be skipped:

#	Ignore python stuff cus it's not part of this project

# The 6th commit message will be skipped:

#	Package lock and service idea

# The 7th commit message will be skipped:

#	Updated run scripts and gitignore

# The 8th commit message will be skipped:

#	Package update

# The 9th commit message will be skipped:

#	Basic daemon script, enough to get moving with

# The 10th commit message will be skipped:

#	Dice roller tweak to not collide with other roller

# The 11th commit message will be skipped:

#	Daemon tweaks

# The 12th commit message will be skipped:

#	Daemon tweak

# The 13th commit message will be skipped:

#	Readme tweak.

# The 14th commit message will be skipped:

#	Roleslib is now loading, and rolesize works

# The 2nd commit message will be skipped:

#	Updating package json

# The 2nd commit message will be skipped:

#	Locking in the npm registry key, we've published tavernbot and dungeonary to npm - this closes #5

# The 2nd commit message will be skipped:

#	Test

# The 3rd commit message will be skipped:

#	Version bump for docs

# The 2nd commit message will be skipped:

#	a space of formatting

# The 3rd commit message will be skipped:

#	Better coin message

# The 2nd commit message will be skipped:

#	Ignore python stuff cus it's not part of this project

# The 3rd commit message will be skipped:

#	Package lock and service idea

# The 2nd commit message will be skipped:

#	Package update

# The 2nd commit message will be skipped:

#	Dice roller tweak to not collide with other roller

# The 2nd commit message will be skipped:

#	Daemon tweak

# The 3rd commit message will be skipped:

#	Readme tweak.

# The 4th commit message will be skipped:

#	Roleslib is now loading, and rolesize works

# The 2nd commit message will be skipped:

#	Daemon tweak

# The 3rd commit message will be skipped:

#	Daemon update, should be last one

# The 4th commit message will be skipped:

#	Ignore this commit

# The 5th commit message will be skipped:

#	New discord sublib called chatter

# The 6th commit message will be skipped:

#	Beta summoning function

# The 7th commit message will be skipped:

#	First try at summon, committing tweak to bot config for multichannel

# The 8th commit message will be skipped:

#	semver bump

# The 9th commit message will be skipped:

#	semver bump actual this time

# The 2nd commit message will be skipped:

#	Service scripts (#54)
#
#	* Nuke old daemon script
#	* Service dir with test scripts for running live - progress on #38 and #47

# The 3rd commit message will be skipped:

#	Systemd unit should be complete, updated service use instructions with basic notes

# The 2nd commit message will be skipped:

#	Package cleanup + lock update

# The 3rd commit message will be skipped:

#	Nodeenv output to verify #38

# The 2nd commit message will be skipped:

#	Daemon update, should be last one

# The 2nd commit message will be skipped:

#	Fixing service script so its run as npm to deliver package props for gravemind lib

# The 3rd commit message will be skipped:

#	Script that should do the trick for #63 but we need to test it

# The 4th commit message will be skipped:

#	Perms on autoup script

# The 5th commit message will be skipped:

#	Cleanup on autoupdate script

# The 2nd commit message will be skipped:

#	Updating service dir with update script and clean docs, killing init script

# The 3rd commit message will be skipped:

#	Default issue markdown file

# The 4th commit message will be skipped:

#	Amending commit - readme update

# The 5th commit message will be skipped:

#	Rename DefaultIssueFormat.md to ISSUE_TEMPLATE.md

# The 2nd commit message will be skipped:

#	Readme update with importerror fix

# The 3rd commit message will be skipped:

#	Fixed typo, added helpful cron entries

# The 2nd commit message will be skipped:

#	Comment

# The 2nd commit message will be skipped:

#	Dungeonary version bump for npm update:

# The 2nd commit message will be skipped:

#	Fixing readme links after transfer
This issue was closed.
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

0 participants