Skip to content

Installation

Andrew Barron edited this page Aug 16, 2021 · 7 revisions

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.

  1. Get the latest release from GitHub: git clone https://github.com/wlabarron/submit-show.git --branch main --depth=1.
  2. Make sure ffmpeg is installed on your server. On Linux, you can install it with apt install ffmpeg.
  3. Install the rest of the dependencies: composer install --no-dev
  4. 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.
  5. Copy processing/config.php.template to processing/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.
  6. If you're using shows.json as the URL of show data in config.php, copy shows.json.example to shows.json and edit it to your liking.
  7. 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.
  8. 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 is index.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);
Clone this wiki locally