Browse Source

Finally available to the general public.

master
Jonathan Rosenbaum 10 years ago
commit
7871d51165
  1. 26
      Dockerfile
  2. 10
      YBDB.php
  3. 3
      apache2.conf
  4. 3
      mysql.conf

26
Dockerfile

@ -0,0 +1,26 @@
########
# YBDB #
########
# YBP Hours and Transaction Database
# Password is
FROM bikebike/bikebike
MAINTAINER Jonathan Rosenbaum <gnuser@gmail.com>
RUN apt-get update && apt-get -y install apache2-mpm-prefork php5 php5-mysql;
RUN cd /var/www/html/; \
rm index.html; \
git clone git://github.com/fspc/Yellow-Bike-Database.git .; \
rm YBDB.php
COPY YBDB.php /var/www/html/Connections/
RUN service mysql start; \
mysqladmin create ybdb; \
mysql -e "GRANT ALL PRIVILEGES ON ybdb.* TO 'admin'@'%' IDENTIFIED BY 'yblcatx' with grant option"; \
mysql ybdb < /var/www/html/MySQL_Structure.sql
COPY mysql.conf /etc/supervisor/conf.d/
COPY apache2.conf /etc/supervisor/conf.d/
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
# docker run -d -p 81:80 --name="ybdb" bikebike/ybdb

10
YBDB.php

@ -0,0 +1,10 @@
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_YBDB = "localhost";
$database_YBDB = "ybdb";
$username_YBDB = "admin";
$password_YBDB = "yblcatx";
$YBDB = mysql_pconnect($hostname_YBDB, $username_YBDB, $password_YBDB) or trigger_error(mysql_error(),E_USER_ERROR);
?>

3
apache2.conf

@ -0,0 +1,3 @@
[program:apache2]
command=apachectl -D "FOREGROUND" -k start
redirect_stderr=true

3
mysql.conf

@ -0,0 +1,3 @@
[program:mysql]
command=/usr/bin/mysqld_safe
autorestart=true
Loading…
Cancel
Save