diff --git a/Dockerfile b/Dockerfile index 7772184d5..e1eb87352 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/start_container.sh b/start_container.sh index 89763835b..c509668fa 100644 --- a/start_container.sh +++ b/start_container.sh @@ -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