-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #212 from basoro/mlite
Mlite
- Loading branch information
Showing
63 changed files
with
7,351 additions
and
597 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,4 @@ logs/ | |
config.php | ||
workerman.php | ||
composer.lock | ||
backups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.keypad button { | ||
margin: 1%; | ||
width: 31%; | ||
height: 23%; | ||
background: #eee; | ||
border: 2px solid black; | ||
border-radius: 10px; | ||
font-size: 3em; | ||
} | ||
|
||
.keypad button.delete, | ||
.keypad button.submit { | ||
background: black; | ||
color: white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
;(function($) { | ||
(function(pluginName) { | ||
var defaults = { | ||
inputField: 'input.keypad', | ||
buttonTemplate: '<button></button>', | ||
submitButtonText: 'ok', | ||
deleteButtonText: 'del', | ||
submitButtonClass: 'submit', | ||
deleteButtonClass: 'delete' | ||
}; | ||
$.fn[pluginName] = function(options) { | ||
options = $.extend(true, {}, defaults, options); | ||
|
||
return this.each(function() { | ||
var elem = this, | ||
$elem = $(elem), | ||
$input = jQuery.type(options.inputField) == 'string' ? $(options.inputField) : options.inputField, | ||
$form = $input.parents('form').length ? $($input.parents('form')[0]) : $elem; | ||
|
||
var numbers = Array.apply(null, Array(9)).map(function (_, i) { | ||
return $(options.buttonTemplate).html(i+1).addClass('number'); | ||
}); | ||
numbers.push($(options.buttonTemplate).html(options.deleteButtonText).addClass(options.deleteButtonClass)); | ||
numbers.push($(options.buttonTemplate).html("0").addClass('number')); | ||
numbers.push($(options.buttonTemplate).html(options.submitButtonText).addClass(options.submitButtonClass)); | ||
$elem.html(numbers).addClass('keypad'); | ||
|
||
$elem.find('.number').click(function(e) { | ||
$input.val($input.val() + $(e.target).text()); | ||
$input.trigger('change'); | ||
}); | ||
$elem.find('.' + options.deleteButtonClass).click(function(e) { | ||
$input.val($input.val().slice(0, -1)); | ||
$input.trigger('change'); | ||
}); | ||
$elem.find('.' + options.submitButtonClass).click(function(e) { | ||
$form.submit(); | ||
}); | ||
}); | ||
}; | ||
$.fn[pluginName].defaults = defaults; | ||
})('keypad'); | ||
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
if (!version_compare(PHP_VERSION, '7.0.0', '>=')) { | ||
exit("mLITE requires at least <b>PHP 7.0</b>"); | ||
} | ||
|
||
define('DBHOST', '172.17.0.1'); | ||
define('DBPORT', '3308'); | ||
define('DBUSER', 'mlite_db'); | ||
define('DBPASS', 'mlite_db'); | ||
define('DBNAME', 'mlite_db'); | ||
|
||
// URL Webapps | ||
define('WEBAPPS_URL', $_SERVER['SERVER_ADDR'].'/uploads'); | ||
define('WEBAPPS_PATH', BASE_DIR . '/uploads'); | ||
|
||
// Admin cat name | ||
define('ADMIN', 'admin'); | ||
|
||
// Multi APP | ||
define('MULTI_APP', false); | ||
define('MULTI_APP_REDIRECT', ''); | ||
|
||
// Themes path | ||
define('THEMES', BASE_DIR . '/themes'); | ||
|
||
// Modules path | ||
define('MODULES', BASE_DIR . '/plugins'); | ||
|
||
// Uploads path | ||
define('UPLOADS', BASE_DIR . '/uploads'); | ||
|
||
// Lock files | ||
define('FILE_LOCK', false); | ||
|
||
// Basic modules | ||
define('BASIC_MODULES', serialize([ | ||
9 => 'settings', | ||
0 => 'dashboard', | ||
1 => 'master', | ||
2 => 'pasien', | ||
3 => 'rawat_jalan', | ||
4 => 'kasir_rawat_jalan', | ||
5 => 'kepegawaian', | ||
6 => 'farmasi', | ||
8 => 'users', | ||
7 => 'modules', | ||
10 => 'wagateway' | ||
])); | ||
|
||
// Developer mode | ||
define('DEV_MODE', true); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
version: "3" | ||
services: | ||
nginx: | ||
build: | ||
context: . | ||
dockerfile: nginx.Dockerfile | ||
image: nginx:alpine | ||
ports: | ||
- 8085:80 | ||
networks: | ||
- internal | ||
volumes: | ||
- .:/var/www/html/ | ||
- ./logs/nginx:/var/log/nginx/ | ||
depends_on: | ||
- php | ||
|
||
php: | ||
image: php:8.1-fpm-alpine | ||
user: root | ||
build: | ||
context: . | ||
dockerfile: php.Dockerfile | ||
networks: | ||
- internal | ||
volumes: | ||
- .:/var/www/html/ | ||
depends_on: | ||
- mysql | ||
|
||
mysql: | ||
image: mysql:5.7.22 | ||
restart: always | ||
environment: | ||
MYSQL_ROOT_PASSWORD: rootpassword123 | ||
MYSQL_DATABASE: mlite_db | ||
ports: | ||
- 3308:3306 | ||
expose: | ||
- 3308 | ||
volumes: | ||
- ./mysql:/var/lib/mysql | ||
- ./db:/docker-entrypoint-initdb.d | ||
|
||
networks: | ||
internal: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM nginx:alpine | ||
|
||
COPY nginx/default.conf /etc/nginx/conf.d | ||
|
||
# COPY . /var/www/html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
server { | ||
listen 0.0.0.0:80; | ||
|
||
root /var/www/html/mlite; | ||
|
||
location / { | ||
index index.php; | ||
if (!-e $request_filename) { | ||
rewrite / /index.php last; | ||
} | ||
} | ||
|
||
location ^~ /systems/data/ { | ||
deny all; | ||
return 403; | ||
} | ||
|
||
location /admin { | ||
index index.php; | ||
try_files $uri $uri/ /admin/index.php?$args; | ||
} | ||
|
||
location ~ \.php$ { | ||
include fastcgi_params; | ||
fastcgi_pass php:9000; | ||
fastcgi_index index.php; | ||
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM php:8.1-fpm-alpine | ||
|
||
RUN apk update | ||
RUN apk upgrade | ||
RUN apk add ca-certificates wget | ||
RUN update-ca-certificates | ||
RUN apk add libpng-dev | ||
|
||
RUN apk add --no-cache mysql-client msmtp perl wget procps shadow libzip libpng libjpeg-turbo libwebp freetype icu | ||
|
||
RUN apk add --no-cache --virtual build-essentials \ | ||
icu-dev icu-libs zlib-dev g++ make automake autoconf libzip-dev \ | ||
libpng-dev libwebp-dev libjpeg-turbo-dev freetype-dev && \ | ||
docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp && \ | ||
docker-php-ext-install gd && \ | ||
docker-php-ext-install mysqli && \ | ||
docker-php-ext-install pdo_mysql && \ | ||
docker-php-ext-install intl && \ | ||
docker-php-ext-install opcache && \ | ||
docker-php-ext-install exif && \ | ||
docker-php-ext-install zip && \ | ||
apk del build-essentials && rm -rf /usr/src/php* | ||
|
||
WORKDIR /var/www/html | ||
|
||
RUN wget https://getcomposer.org/composer-stable.phar -O /usr/local/bin/composer && chmod +x /usr/local/bin/composer | ||
RUN php /usr/local/bin/composer create-project basoro/mlite mlite | ||
|
||
COPY config.php mlite/config.php | ||
|
||
RUN mkdir -p mlite/uploads | ||
RUN mkdir -p mlite/tmp | ||
RUN mkdir -p mlite/admin | ||
RUN mkdir -p mlitr/admin/tmp | ||
|
||
RUN chmod -R 777 mlite/uploads | ||
RUN chmod -R 777 mlite/tmp | ||
RUN chmod -R 777 mlite/admin/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.