mirror of
https://github.com/fspc/ybdb.git
synced 2025-02-28 18:43:23 -05:00
Improvements to the Dockerfile:
1. WORKDIR added 2. sets up a csv directory for accounting files 3. Adds to VOLUME for mysql and configuration files 4. EXPOSE 80
This commit is contained in:
parent
89b5ba5878
commit
a00d6d8555
14
Dockerfile
14
Dockerfile
@ -8,8 +8,10 @@ FROM bikebike/bikebike:14.04
|
|||||||
MAINTAINER Jonathan Rosenbaum <gnuser@gmail.com>
|
MAINTAINER Jonathan Rosenbaum <gnuser@gmail.com>
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y install apache2-mpm-prefork php5 php5-mysql php5-curl;
|
RUN apt-get update && apt-get -y install apache2-mpm-prefork php5 php5-mysql php5-curl;
|
||||||
RUN cd /var/www/html/; \
|
|
||||||
rm index.html; \
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
RUN rm index.html; \
|
||||||
git clone -b devel https://github.com/fspc/Yellow-Bike-Database.git .
|
git clone -b devel https://github.com/fspc/Yellow-Bike-Database.git .
|
||||||
|
|
||||||
COPY YBDB.php /var/www/html/Connections/
|
COPY YBDB.php /var/www/html/Connections/
|
||||||
@ -26,11 +28,17 @@ RUN service mysql start; \
|
|||||||
mysql ybdb < /var/www/html/sql/MySQL_Structure.sql; \
|
mysql ybdb < /var/www/html/sql/MySQL_Structure.sql; \
|
||||||
mysql ybdb < /var/www/html/sql/populate.sql;
|
mysql ybdb < /var/www/html/sql/populate.sql;
|
||||||
|
|
||||||
## Will need to mkdir csv dir, change perms to www-data, and chmod 0700
|
RUN mkdir csv; \
|
||||||
|
chown www-data:www-data csv; \
|
||||||
|
chmod 0700 csv;
|
||||||
|
|
||||||
COPY mysql.conf /etc/supervisor/conf.d/
|
COPY mysql.conf /etc/supervisor/conf.d/
|
||||||
COPY apache2.conf /etc/supervisor/conf.d/
|
COPY apache2.conf /etc/supervisor/conf.d/
|
||||||
|
|
||||||
|
VOLUME /var/lib/mysql /var/www/html/Connections
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||||
|
|
||||||
# docker run -d -p 81:80 --name="ybdb" bikebike/ybdb
|
# docker run -d -p 81:80 --name="ybdb" bikebike/ybdb
|
||||||
|
Loading…
x
Reference in New Issue
Block a user