mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-03 21:33:15 -04:00
Merge remote-tracking branch 'jekkos/master' into ci3
# Conflicts: # application/config/database.php.tmpl
This commit is contained in:
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM jbfink/docker-lampstack
|
||||
MAINTAINER jekkos
|
||||
# Install dependencies
|
||||
RUN apt-get install -y --no-install-recommends software-properties-common
|
||||
RUN apt-get install -y python git
|
||||
RUN apt-get update
|
||||
# RUN add-apt-repository ppa:chris-lea/node.js
|
||||
|
||||
# Get latest Ospos source from Git
|
||||
RUN git clone https://github.com/jekkos/opensourcepos.git /app
|
||||
# RUN cd app && npm install
|
||||
|
||||
RUN ln -fs /app/* /var/www
|
||||
ADD ./start_container.sh /start_container.sh
|
||||
RUN chmod 755 /start_container.sh
|
||||
EXPOSE 80 3306
|
||||
CMD ["/bin/bash", "/start_container.sh"]
|
||||
11
README.md
11
README.md
@@ -16,6 +16,17 @@ username: admin
|
||||
password:pointofsale
|
||||
9. Enjoy
|
||||
|
||||
13/01/2016: Intall using Docker
|
||||
-------------------------------
|
||||
From now on ospos can be deployed using Docker on Linux, Mac or Windows. This setup dramatically reduces the number of possible issues as all setup is now done in a Dockerfile. Docker runs natively on mac and linux, but will require more overhead on windows. Please refer to the docker documentation for instructions on how to set it up on your platform.
|
||||
|
||||
To build and run the image, issue following commands in a terminal with docker installed
|
||||
|
||||
docker build -t me/ospos https://github.com/jekkos/opensourcepos.git
|
||||
docker run -d -p 80:80 me/ospos
|
||||
|
||||
Docker will clone the latest master into the image and start a LAMP stack with the application configured.
|
||||
|
||||
A more extensive setup guide can be found at [this site](http://www.opensourceposguide.com/guide/gettingstarted/installation)
|
||||
|
||||
If you like the project, and you are making money out of it on a daily basis, then consider to buy me a coffee so I can keep adding features.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
class MY_Lang extends CI_Lang
|
||||
{
|
||||
|
||||
function MY_Lang()
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ echo form_open('config/save_locale/',array('id'=>'locale_config_form'));
|
||||
'en' => 'English',
|
||||
'es' => 'Spanish',
|
||||
'ru' => 'Russian',
|
||||
'nl-BE' => 'Dutch',
|
||||
'nl-BE' => 'Dutch (Belgium)',
|
||||
'de-CH' => 'German (Swiss)',
|
||||
'zh' => 'Chinese',
|
||||
'id' => 'Indonesian',
|
||||
|
||||
16
start_container.sh
Normal file
16
start_container.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
if [ ! -f /mysql-configured ]; then
|
||||
/usr/bin/mysqld_safe &
|
||||
sleep 10s
|
||||
MYSQL_PASSWORD=`pwgen -c -n -1 12`
|
||||
echo mysql root password: $MYSQL_PASSWORD
|
||||
echo $MYSQL_PASSWORD > /mysql-root-pw.txt
|
||||
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
|
||||
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
|
||||
sleep 10s
|
||||
fi
|
||||
supervisord -n
|
||||
Reference in New Issue
Block a user