update discordjs start command
add an auto update variable added command to run git pull if .git and auto_update are set added npm install to start command.
This commit is contained in:
		| @@ -3,12 +3,12 @@ | |||||||
|     "meta": { |     "meta": { | ||||||
|         "version": "PTDL_v1" |         "version": "PTDL_v1" | ||||||
|     }, |     }, | ||||||
|     "exported_at": "2019-06-12T17:47:09-04:00", |     "exported_at": "2019-06-13T10:40:57-04:00", | ||||||
|     "name": "discord.js generic", |     "name": "discord.js generic", | ||||||
|     "author": "parker@parkervcp.com", |     "author": "parker@parkervcp.com", | ||||||
|     "description": "a generic discord js bot egg\r\n\r\nThis will clone a git repo for a bot. it defaults to master if no branch is specified.\r\n\r\nInstalls the node_modules on install. If you set user_upload then I assume you know what you are doing.", |     "description": "a generic discord js bot egg\r\n\r\nThis will clone a git repo for a bot. it defaults to master if no branch is specified.\r\n\r\nInstalls the node_modules on install. If you set user_upload then I assume you know what you are doing.", | ||||||
|     "image": "quay.io\/parkervcp\/pterodactyl-images:bot_discordjs", |     "image": "quay.io\/parkervcp\/pterodactyl-images:bot_discordjs", | ||||||
|     "startup": "\/usr\/local\/bin\/node \/home\/container\/index.js", |     "startup": "if [[ -d .git ]] && [[ ${AUTO_UPDATE} == \"1\" ]]; then git pull; fi && \/usr\/local\/bin\/npm install --production && \/usr\/local\/bin\/node \/home\/container\/index.js", | ||||||
|     "config": { |     "config": { | ||||||
|         "files": "{}", |         "files": "{}", | ||||||
|         "startup": "{\r\n    \"done\": \"change this part\"\r\n}", |         "startup": "{\r\n    \"done\": \"change this part\"\r\n}", | ||||||
| @@ -49,6 +49,15 @@ | |||||||
|             "user_viewable": 1, |             "user_viewable": 1, | ||||||
|             "user_editable": 0, |             "user_editable": 0, | ||||||
|             "rules": "required|bool" |             "rules": "required|bool" | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |             "name": "Auto Update", | ||||||
|  |             "description": "When using a git repo pull the latest files on startup.", | ||||||
|  |             "env_variable": "AUTO_UPDATE", | ||||||
|  |             "default_value": "false", | ||||||
|  |             "user_viewable": 1, | ||||||
|  |             "user_editable": 1, | ||||||
|  |             "rules": "required|boolean" | ||||||
|         } |         } | ||||||
|     ] |     ] | ||||||
| } | } | ||||||
		Reference in New Issue
	
	Block a user