demostf/api
Backend code for demos.tf
The api requires a PostgreSQL database to function, the database schema required can be found in demostf/db/demos_schema.sql
.
Note that the pg_trgrm
extension in required.
A prebuild docker image exists in the docker hub which contains nginx, php and this code.
A seperate PostgreSQL database is required to run the image, the database details need to be configured with the following environment variables:
To install the project composer is required.
composer install
Deploying the api requires php7.1 or later,
the webserver needs to be configured to server all requests to public/index.php
execept
for request to /upload
which needs to be handled by public/upload.php
.
The database details need to be configured with the same environment variables as are described for the docker image above.
More information for hosting and a pre-configured docker based setup can be found at demostf/setup
docker pull demostf/api