Toxocious / Absolute

An online multi-player Pokemon RPG with in-depth battling, trading, map exploration, real-time chatting, and more.
MIT License
4 stars 2 forks source link

Add installation script(s) #17

Open Toxocious opened 1 year ago

Toxocious commented 1 year ago

Create an installation script to handle setting up and configuring the server.

  1. Move game source code into /src
  2. Place configuration files in /config
    • Nginx config
  3. Keep non-critical files in / (.md, .sh, etc)

Have the script do the following tasks:

It is assumed that you have cloned this repository before running the script.

  • Prompt what to NAME the game
  • Prompt where to put the game files in the server's file-system
  • Move the ./src folder to the specified DIRECTORY
  • Rename ./src to NAME
  • Install PHP 7.4 on the server
  • Install MySQL on the server
  • Move configuration files to the correct directories
  • Prompt what username to name MySQL user account
  • Prompt what password to give MySQL user account
  • Prompt to reconfirm password from previous prompt
  • Create MySQL user absolute with username and password from prior prompts
  • Set cwd to ../DIRECTORY
  • Clone the Absolute Database repository to ./INIT_DATABASE
  • Set cwd to ./INIT_DATABASE
  • Loop through all *.sql files in the directory and execute them through MySQL CLI
  • Display RPG admin login credentials
  • These are pre-baked into the users table for convenience

Potentially have the installation script clone and install both the in-game chat system and the discord bot?

Toxocious commented 1 year ago

Likely to be closed and not implemented once Docker has been set-up in the docker-implementation branch.

Toxocious commented 1 year ago

I retract my previous comment.

We can still use an installation script (./start.sh) that handles building/starting Docker container(s) for Absolute.

./start.sh

Toxocious commented 1 year ago

With the recent commit refactor ./start.sh, we now have a script that sets up a server for Absolute.

It generates SSL certs, builds and spins up docker containers, and runs all needed SQL migrations to have an up-to-date database.

Since we're going the route of using migrations, the Absolute Database repository will end up being deleted as it is no longer needed.

The next step is to integrate the chat-system and discord bot into the docker configuration that we're currently using.

Currently thinking about integrating these by having the start.sh script clone each repository and spin up docker containers for each of them or something - this depends on if I end up rewriting the chat system to actually build dist files for both the server and client.

Toxocious commented 1 year ago

I have added Absolute's Discord bot to our Docker configuration. It now runs automatically when the ./start.sh script has been run.

I will be adding Absolute's chat system to the Docker configuration in the coming days after refactoring it and rewriting the client-side code in TypeScript.