Installation - wlabarron/submit-show GitHub Wiki
It's recommended to read through all of the instructions before you start to make sure your server is capable of handling all the bits which need to run. In future, this might become more automated and less error prone.
- Get the latest release from GitHub:
git clone https://github.com/wlabarron/submit-show.git --branch main --depth=1
. - Make sure ffmpeg is installed on your server. On Linux, you can install it with
apt install ffmpeg
. - Install the rest of the dependencies:
composer install --no-dev
- Create a database and associated user. Remember to restrict the user to only the database you want to use for the Submit Shows tool. Build the necessary tables.
- Copy
processing/config.php.template
toprocessing/config.php
and edit the configuration to your liking. You will need to make some changes here if you want the system to be functional. - If you're using
shows.json
as the URL of show data inconfig.php
, copyshows.json.example
toshows.json
and edit it to your liking. - Set up a cron job to run the file
processing/cron.php
on a regular interval. This cron job is what moves show files to your uploads folder or offsite storage provider, deletes old shows, and publishes shows to Mixcloud. This may look like* * * * * php -f /var/www/processing/cron.php
. - Configure your web server to serve the directory you've installed the project in. If you want to be thorough, you can forbid public access to
/processing/*
,/vendor/*
,/composer*
,/.git/*
,/.gitignore
, and*.md
. The index page isindex.php
.
Building tables
This is the command to run inside your new database to build the necessary schema.
create table log
(
id int auto_increment
primary key,
user text not null,
action_type text not null,
action_detail text not null,
datetime datetime default current_timestamp() not null
);
create table saved_info
(
`show` int not null
primary key,
description text null,
image longblob null
);
create table saved_tags
(
id int auto_increment
primary key,
tag text not null,
`show` int not null
);
create index saved_tags_saved_info_show_fk
on saved_tags (`show`);
create table submissions
(
id int auto_increment
primary key,
file text not null,
`file-location` text not null,
title text not null,
description text not null,
`end-datetime` datetime not null,
image longblob null,
`deletion-datetime` datetime null,
`notification-email` text null
);
create table tags
(
id int auto_increment
primary key,
tag text not null,
submission int not null
);
create index tags_submissions_id_fk
on tags (submission);