tipsypastels

Untitled

Dec 6th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!

Part 1: Maintenance

Accessing the Console

Log into Vultr and copy the "server password" there. Use a terminal application like PuTTY (or the ssh command on Unix) to log in as root. Johnny should already know how to do this so I'm going light on the details.

Rebooting the Forums

The forum docker image is stored in /var/discourse. Access that with cd /var/discourse. From there you can use ./launcher start app, ./launcher restart app, or ./launcher rebuild app. You can see the differences and a list of other commands at the bottom of this page. Rebuilding will also redownload and upgrade the entire site, which can take around 10 minutes.

Upgrading the Forums

You can upgrade Discourse, and individual plugins, from https://www.safarizone.net/admin/upgrade. Doing it this way will not take the site offline. Be aware that this doesn't always work, with large updates they often require you to do a rebuild app like in the previous section. If an update for docker_manager is available, the page requires you to update that before anything else.

Rebooting Zine

Zine uses a docker-compose image, which I put in /wordpress. Access it with cd /wordpress. If Zine has crashed, use docker-compose start to start it. See the full command list by typing docker-compose. Note that Zine uses two docker-compose images, one for the web server and one for the database. NEVER RUN DOCKER-COMPOSE DOWN UNDER ANY CIRCUMSTANCES, as this will drop both of those images, deleting all the content on Zine.

Rebooting PS!

First try screen -r ps to see if the screen session is still online (if there's been a crash, it may not be). If not, make a new one and rename it to that (look up how to use linux screen if you're not sure, it's simple). The battle server files are stores in /battle-server. Once you're in there, just run node pokemon-showdown and it should be up. Unlike the forums/Zine, this doesn't run in the background, which is why you have to use a screen session for it.

Part 2: Development

Accessing the Zine filesystem

Unless there's been a crash, screen -r wp should take you right into the Zine files, usually right inside the folder for the custom theme I made. You can use this to git pull changes quickly. If there has been a crash, just make a new screen session called wp, enter the /wordpress folder and use docker-compose exec web bash to shell into the docker-compose image.

Making changes to Zine

Zine's theme is stored on my github. You can fork it and update the server to use that instead, or ask me for collaborator access with your Github username, and I will grant you that.

Making changes to the forums

Discourse has two means of making changes - themes and plugins. I'm not going into detail because you can read a lot about them, and how to install them, on the Discourse forums. Suffice it to say, themes are easier to create, can alter the layout, style, and add limited front-end functionality, and can be edited in the Admin panel, whereas plugins are more powerful and complicated.

Fixing the broken icons

Discourse recently upgraded to Font Awesome 5. They also decided to only include the essential icons they needed for their UI, which broke our ability to use any icon in the forum images. Read about this here https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643.

There are instructions on that page for how to add the rest of the icons, once you've familiarized yourself with how plugins work it should be pretty simple.

Changing the navbar and footer text

Navbar: https://www.safarizone.net/admin/customize/themes/12
Footer: https://www.safarizone.net/admin/customize/themes/11/common/footer/edit

Fin

Good luck friends.

Add Comment
Please, Sign In to add comment