Server
Server copied to clipboard
feat(infra): Composer to build a full-stack production environment
Context
Currently, there exists a composer yml and a dockerfile in root directory, but they don't serve too much purpose. This PR aims to add setup scripts, that builds a production environment with authentication, and would ideally work both locally and with a domain & HTTPS.
In order to run this locally, this needs to be merged: https://github.com/2004Scape/Website/pull/7
Description
- Adds a full-stack docker composer, that builds a production environment
- Creates database within the container (with phpMyAdmin, or Prisma studio for anyone wanting web interface)
- Waits for database to build and runs migrations automatically
- Services:
- MySQL
- Migration runner
- Website
- Logger
- Friend
- Login
- Server
TODO:
- [x] Merge #7 and fix website service clone in composer
- [x] Fix world json generation in composer (needs to be more dynamic)
- [x] Add either phpMyAdmin service, or Prisma studio
- [x] Add Linux prod build script (currently only windows .bat exists)
- [ ] Add and configure Nginx service sigh
- [ ] Test on live Ubuntu domain & https
- [ ] Update readme
- [ ] Add instructions for a full-stack dev build (fixes https://github.com/2004Scape/Server/issues/783)