Make docker work wig

This commit is contained in:
jekkos committed 2016-01-21 16:23:17 +01:00
1 parent 2b70762b7a
commit 9048d68baf
2 files changed
+5 -1

No files matched your search

+1
View File
@@ -15,6 +15,7 @@ RUN apt-get install -y python git
# Get latest Ospos source from Git
RUN git clone https://github.com/jekkos/opensourcepos.git /app
RUN cd app && git checkout develop/2.4
# RUN cd app && npm install
RUN ln -fs /app/* /var/www/html
+4 -1
View File
@@ -8,7 +8,10 @@ if [ ! -f /mysql-configured ]; then
[ -f /var/www/html/index.html ] && rm /var/www/html/index.html
mysqladmin -u root password $MYSQL_PASSWORD
cp /app/application/config/database.php.tmpl /app/application/config/database.php
sed -i "s/\(password...=.\).*/\1'${MYSQL_PASSWORD}';/g" /app/application/config/database.php
# sed -i "s/\(password...=.\).*/\1'${MYSQL_PASSWORD}';/g" /app/application/config/database.php
sed -i "s/\(password..=..\).*/\1'${MYSQL_PASSWORD}',/g" /app/application/config/database.php
sed -i "s/\(database..=..\).*/\1'ospos',/g" /app/application/config/database.php
sed -i "s/\(username..=..\).*/\1'root',/g" /app/application/config/database.php
mysql -e "CREATE DATABASE IF NOT EXISTS ospos; use ospos; source /app/database/tables.sql; source /app/database/constraints.sql;" -uroot -p${MYSQL_PASSWORD}
touch /mysql-configured
killall mysqld