This repository contains the source for LMMS's website, live at https://lmms.io.
lmms.io runs on DigitalOcean. Click the button below for more information, or access this link: https://m.do.co/c/c77894a32e56. Both will utilize our referral code.
- Fork the repository here
- Clone the forked repository.
git clone https://github.com/<your-username>/lmms.io.gitThe website requires authentication with the GitHub API for fetching GitHub Discussions posts for the /news endpoint, with the authentication and data fetching itself being managed by the knplabs/github-api dependency. A classic GitHub PAT (personal access token) is needed for local testing, which should be placed in the .env.local file on the root of the repository with the contents:
###> knplabs/github-api ###
GITHUB_AUTH_METHOD=client_id_header
GITHUB_USERNAME=...
GITHUB_SECRET=ghp_...
###< knplabs/github-api ###The only required scope of this token is read:discussion, other scopes are unnecessary.
This project uses Composer for dependency management. You'll have to fetch those dependencies using Composer. For this, you must have Composer installed on your system. Install it using your distro's preferred package manager.
Install PHP 8.2 and the required components:
Debian/Ubuntu-based
sudo add-apt-repository ppa:ondrej/php
sudo apt install curl php8.2 php8.2-xml php8.2-gd php8.2-intl php-symfonyArch/Arch-based
sudo pacman -S curl php php-gd composer
sudo [yay/paru] -S symfony-cliThen install Composer:
Universal
curl -sS https://getcomposer.org/installer | phpAfter downloading Composer locally using the instructions above, fetch the dependencies by running the command below.
php composer.phar installYou'll have to run this command every time the dependencies in composer.json change.
Note
You need to add php.exe to the Windows PATH, usually located in c:\wamp\bin\php\phpx.y.z
For instructions for other OSes or for installing globally, visit Composer's Getting Started document.
A convenient setup script is provided in dev/windows/setup.ps1. You just need to provide the path of where you've installed PHP, and it will setup PHP, install Composer, and install the project's dependencies on its own.
If you skipped automatic .ini validation or modification, there are some changes you'll need to make to your configuration file manually:
- Locate
php.ini-developmentorphp.iniin the folder where you've installed/extracted the PHP release. This folder should also be wherephp.exeresides- If you have the
php.ini-developmentfile, remove the-developmentsuffix from the file extension, the resulting file name should just bephp.ini - If you would like to just edit your existing
php.ini, leave it be.
- If you have the
- Edit the file, and uncomment these lines:
;extension_dir = "ext";extension=gd;extension=intl;extension=openssl;extension=pdo_mysql
- Save your edits, then re-run the setup script.
Not only does this allow the automatic script to execute, but also enable the local development server to function at all.
Note
For macOS, some dependencies must be installed manually.
- Start the local server.
php -S localhost:8000 -t ./public/You can then open http://localhost:8000/ in a browser.
- Optionally, configure the local
apacheandnginxinstances.
With Apache:
<Directory /home/user/lmms.io/public/>
# add fallback resource to Apache config
FallbackResource /index.php
</Directory>With Nginx:
# go to our front controller if none of them exists
location / {
try_files $uri $uri/ /index.php?$args;
}