mirror of https://github.com/fspc/ybdb.git
Jonathan Rosenbaum
10 years ago
commit
7871d51165
4 changed files with 42 additions and 0 deletions
@ -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 |
@ -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); |
||||
|
?> |
@ -0,0 +1,3 @@ |
|||||
|
[program:apache2] |
||||
|
command=apachectl -D "FOREGROUND" -k start |
||||
|
redirect_stderr=true |
@ -0,0 +1,3 @@ |
|||||
|
[program:mysql] |
||||
|
command=/usr/bin/mysqld_safe |
||||
|
autorestart=true |
Loading…
Reference in new issue