BUIld mysql db container seeded with data from ergast.com
453
Based on the ergast-f1-api, a PHP-based API using the Ergast Formula One MySQL database developed by Chris Newell.
docker-compose up --build -d --remove-orphanshttp://localhost:8000/api/f1/2017.jsonAssumes: Apache with PHP 5
Obtain a MySQL database image from: http://ergast.com/mrd/db/
Restore the database and set the username and password for a user with read-only privileges in f1dbro.inc
Under Apache, ensure that mod_rewrite is available. Enable AllowOverride All to support directory based rewrites, and add a rewrite rule to the .htaccess file in the root directory of the server e.g.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^api/(.*) /php/api/index.php [L]
</IfModule>
This example assumes the API code is installed in /php/api and the desired location of the API is /api
Content type
Image
Digest
Size
172.8 MB
Last updated
about 5 years ago
docker pull psychemedia/ergast-f1-api:db