2014-12-11 19:56:16 +00:00
|
|
|
########
|
|
|
|
# YBDB #
|
|
|
|
########
|
|
|
|
# YBP Hours and Transaction Database
|
2015-03-07 07:59:45 +00:00
|
|
|
# Password is
|
2014-12-11 19:56:16 +00:00
|
|
|
|
2016-10-21 20:53:14 +00:00
|
|
|
FROM bikebike/bikebike:14.04
|
2018-05-05 22:04:29 +00:00
|
|
|
MAINTAINER Jonathan Rosenbaum <bike@bikelover.org>
|
2014-12-11 19:56:16 +00:00
|
|
|
|
2015-02-28 09:59:07 +00:00
|
|
|
RUN apt-get update && apt-get -y install apache2-mpm-prefork php5 php5-mysql php5-curl;
|
2017-07-14 02:01:48 +00:00
|
|
|
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
|
|
|
|
RUN rm index.html; \
|
2014-12-15 06:05:45 +00:00
|
|
|
git clone -b devel https://github.com/fspc/Yellow-Bike-Database.git .
|
2014-12-15 05:45:52 +00:00
|
|
|
|
2017-08-12 04:04:20 +00:00
|
|
|
COPY local_configurations.php /var/www/html/Connections/
|
2014-12-29 01:20:52 +00:00
|
|
|
# COPY populate.sql /var/www/html/sql/
|
2014-12-31 08:19:42 +00:00
|
|
|
|
|
|
|
# mysql_install_db solves a problem which occurs if bikebike/bikebike has not
|
|
|
|
# been updated in a long time where mysql cannot find Table mysql.db when
|
|
|
|
# started with mysqld_safe
|
|
|
|
|
|
|
|
RUN service mysql start; \
|
2018-05-05 22:04:29 +00:00
|
|
|
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql; \
|
2014-12-31 08:19:42 +00:00
|
|
|
mysql_install_db; \
|
2014-12-11 19:56:16 +00:00
|
|
|
mysqladmin create ybdb; \
|
|
|
|
mysql -e "GRANT ALL PRIVILEGES ON ybdb.* TO 'admin'@'%' IDENTIFIED BY 'yblcatx' with grant option"; \
|
2014-12-20 02:45:51 +00:00
|
|
|
mysql ybdb < /var/www/html/sql/MySQL_Structure.sql; \
|
|
|
|
mysql ybdb < /var/www/html/sql/populate.sql;
|
2014-12-11 19:56:16 +00:00
|
|
|
|
2017-07-14 02:01:48 +00:00
|
|
|
RUN mkdir csv; \
|
|
|
|
chown www-data:www-data csv; \
|
|
|
|
chmod 0700 csv;
|
2015-01-25 07:00:00 +00:00
|
|
|
|
2014-12-28 03:09:37 +00:00
|
|
|
COPY mysql.conf /etc/supervisor/conf.d/
|
2014-12-11 19:56:16 +00:00
|
|
|
COPY apache2.conf /etc/supervisor/conf.d/
|
|
|
|
|
2017-07-14 02:01:48 +00:00
|
|
|
VOLUME /var/lib/mysql /var/www/html/Connections
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
2014-12-11 19:56:16 +00:00
|
|
|
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
|
|
|
|
|
|
|
# docker run -d -p 81:80 --name="ybdb" bikebike/ybdb
|