MAJOR REFACTOR IN PROGRESS. USE opensb-1.2
(stable) or opensb-1.3
(beta) BRANCH FOR THE TIME BEING
Alternative domains: squarebracket.bluffingo.net, FulpTube.rocks
I wouldn't recommend using this code unless if you really know what you're doing.
- Get a webserver (Apache or NGINX) with PHP and MariaDB (MySQL may work but it is untested) up and running, including Composer and the PHP GD library extension. We recommend Apache, as you will experience issues with NGINX.
- Configure your webserver. Look below the steps for an example.
- Run
composer update
from the terminal. - Copy
config.sample.php
inprivate/config
, rename it toconfig.php
and fill in your database credentials. - Import the database template found in
sql/
into the database you want to use. - Run the
compile-scss
script available in the tools directory to generate the required stylesheets. You may find Dart-Sass here at https://sass-lang.com/install. Ruby Sass is deprecated, do not use it. You MUST use a specific Dart-Sass, or it won't work. You can find it here.
- Use Linux for anything related to production.
- Instead of installing dependencies using
composer update
you docomposer update --no-dev
- Make the
dynamic/
andtemplates/cache/
directories writable by your web server. - Modify branding settings to replace the default OpenSB branding with your custom branding. Check the
public/assets/placeholder
directory for reference.
- Enable debugging features by setting
$isDebug
to true. - If you want to be able to upload during development, make the
dynamic/
directory and the directories inside it writable by your web server.
You will have to modify the directories to match your instance's location.
<VirtualHost *>
ServerName localhost
DocumentRoot "C:/xampp/openSB/public"
Alias /dynamic "C:/xampp/openSB/dynamic"
<Directory "C:/xampp/openSB">
Options Indexes FollowSymLinks
Require all granted
AllowOverride All
</Directory>
</VirtualHost>
Please note that this example uses php-fpm
.
You will have to modify the directories to match your instance's location.
server {
listen 80;
server_name www.squarebracket.pw
server_name squarebracket.pw;
root /var/www/squarebracket/public/;
location / {
try_files $uri /index.php$is_args$args;
}
location /dynamic/ {
root /var/www/squarebracket/dynamic/;
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}