Commit 78d0185a by aagusti

perbaikan README dan sample configuration live.ini

1 parent 0f6b8659
# Basis Aplikasi openSIPKD # Basis Aplikasi openSIPKD
========================
Ini adalah basis dari seluruh aplikasi openSIPKD. Ini adalah basis dari seluruh aplikasi openSIPKD.
Pemasangan # Pemasangan
----------
Pasang paket Debian yang dibutuhkan:: ## Pasang paket Debian yang dibutuhkan::
$ sudo apt-get install libxml2-dev libxslt1-dev libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev $ sudo apt install libxml2-dev libxslt1-dev libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev
Buat Python Virtual Environment, biasanya pada home directory:: ## Buat Python Virtual Environment:
Biasanya pada home directory::
$ python3 -m venv ~/env $ python3 -m venv ~/env
$ ~/env/bin/pip install --upgrade pip setuptools $ ~/env/bin/pip install --upgrade pip setuptools
$ ~/env/bin/pip install wheel $ ~/env/bin/pip install wheel
Install Production ##Instalasi
------------------
###Production:
$ ~/env/bin/pip install git+https://git.opensipkd.com/aa.gusti/base.git@latest $ ~/env/bin/pip install git+https://git.opensipkd.com/aa.gusti/base.git@latest
$ cp ~/env/etc/live_opensipkd.tpl ~/env/etc/live_opensipkd.ini $ cp ~/env/etc/live_opensipkd.tpl ~/env/etc/live_opensipkd.ini
Install Development:: ###Install Development::
-------------------
$ source ~/env/bin/activate $ source ~/env/bin/activate
$ mkdir apps $ mkdir apps
$ cd apps $ cd apps
$ git clone https://git.opensipkd.com/bekasi/base.git@ciamis $ git clone https://git.opensipkd.com/aa.gusti/base.git@latest
$ env/bin/pip install -e base[dev] $ env/bin/pip install -e base[dev]
$ cp ~/env/etc/test_opensipkd.tpl ~/env/etc/test_opensipkd.ini $ cp ~/env/etc/test_opensipkd.tpl ~/env/etc/test_opensipkd.ini
Sesuaikan konfigurasi ``test_opensipkd.ini`` atau ``live_opensipkd.ini`` ##Sesuaikan konfigurasi
pada baris berikut ini:: Konfigurasi tergantung pada jenis instalasi ``test_opensipkd.ini`` atau
``live_opensipkd.ini``pada baris berikut ini::
###Database Koneksi:
[app:main]
sqlalchemy.url = postgresql://user:password@localhost:5432/db sqlalchemy.url = postgresql://user:password@localhost:5432/db
session.url = postgresql://user:password@localhost:5432/db session.url = postgresql://user:password@localhost:5432/db
[alembic_ziggurat] [alembic_ziggurat]
sqlalchemy.url = postgresql://user:password@localhost:5432/db sqlalchemy.url = postgresql://user:password@localhost:5432/db
script_location = ziggurat_foundation:migration script_location = ziggurat_foundation:migration
...@@ -45,9 +48,24 @@ pada baris berikut ini:: ...@@ -45,9 +48,24 @@ pada baris berikut ini::
sqlalchemy.url = postgresql://user:password@localhost:5432/db sqlalchemy.url = postgresql://user:password@localhost:5432/db
script_location = opensipkd.base:alembic script_location = opensipkd.base:alembic
###Login/Register:
Handling Log File: [app:main]
================== captcha_files=
# static folder untuk image captcha
reg_captcha = 1
# saat registrasi diwajibkan menggunakan captcha
reg_idcard = 1
# saat registrasi diwajibkan mengisi kode/nik pengguna
# akan menampilkan pula upload file id card
reg_verify = 1
# Registrasi memrlukan verifikasi terlebih dahulu sebelum dapat login
reg_form =
# diisi route registrasi default "register" jika dikosongkan
login_tpl =
# diisi nama template login apabila akan menggunakan template yang berbeda
###Handling Log File:
Logging dapat dilakukan console, file atau tabel Logging dapat dilakukan console, file atau tabel
...@@ -81,14 +99,30 @@ Logging dapat dilakukan console, file atau tabel ...@@ -81,14 +99,30 @@ Logging dapat dilakukan console, file atau tabel
[alembic] [alembic]
sqlalchemy.url = postgresql://user:password@localhost:5432/db sqlalchemy.url = postgresql://user:password@localhost:5432/db
script_location = alembic script_location = alembic
``` ```
###Google Integrated dan Custom Register Form
Aplikasi sudah bisa terintegrsi dengan google oauth2
Konfigurasi merupakan bagian dari "main"
```
[app:main]
allow_register = True
google-signin-client-id = id oauth2 client dari google
```
##Buat tabelnya::
Perintah untuk membuat tabel
$ ~/env/bin/initialize_opensipkd_db [file_config]
Buat tabelnya:: Contoh:
$ ~/env/bin/initialize_opensipkd_db ~/env/etc/test_opensipkd.ini $ ~/env/bin/initialize_opensipkd_db ~/env/etc/test_opensipkd.ini
Jalankan:: ##Jalankan::
$ ~/env/bin/pserve --reload test.ini $ ~/env/bin/pserve --reload test.ini
...@@ -168,25 +202,3 @@ Tambahkan blok berikut ini dibawah ini file ...@@ -168,25 +202,3 @@ Tambahkan blok berikut ini dibawah ini file
``` ```
## Google Integrated dan Custom Register Form
Aplikasi sudah bisa terintegrsi dengan google oauth2
# Setting Configurasi
```
allow_register = True
google-signin-client-id = id oauth2 client dari google
register_form = # nama form buat registrasi default /register
```
# RML Reporting
Untuk aktivasi harus terdapat konfigurasi berikut ini
# Setting Configurasi
```
report_img = # fisik path default "opensipkd_base:static/img"
```
Install :
```
$pip install z3c.rml
```
...@@ -18,9 +18,11 @@ sqlalchemy.url = postgresql://user:password@server:port/db ...@@ -18,9 +18,11 @@ sqlalchemy.url = postgresql://user:password@server:port/db
pyramid.includes = pyramid.includes =
pyramid_tm pyramid_tm
pyramid_beaker pyramid_beaker
pyramid_mailer
pyramid_chameleon pyramid_chameleon
pyramid_rpc.jsonrpc pyramid_rpc.jsonrpc
;Session Configuration
session.type = ext:database session.type = ext:database
session.secret = s0s3cr3t session.secret = s0s3cr3t
session.cookie_expires = true session.cookie_expires = true
...@@ -30,38 +32,74 @@ session.timeout = 3000 ...@@ -30,38 +32,74 @@ session.timeout = 3000
session.lock_dir = %(here)s/tmp session.lock_dir = %(here)s/tmp
timezone = Asia/Jakarta timezone = Asia/Jakarta
# localization = id_ID.UTF-8 localization = id_ID.UTF-8
#localization = Indonesian_indonesia.1252
localization = English_Australia.1252
static_files = %(here)s/../files static_files = %(here)s/../files
captcha_files = %(here)s/tmp/captcha # Static external file uploaded to the system
company = Opensipkd
ibukota = Bekasi # Your Organisation Identity
departement = IT company = Your Company
address_1 = Jalan.... ibukota = Your City
address_2 = Bekasi ... departement = Your Departemen
address_1 = Your Address
center.phone = 021123456789 address_2 = Your Address
center.mobile = 081311045668
center.email = aa.gustiana@gmail.com ;center.phone = 021123456789
center.email_password = ;center.mobile = 081311045668
center.smtp_server =
# Mail Configuration
_host = mail.sender_name =
mail.username =
unoconv_py = C:\Program Files\LibreOffice 5\program\python.exe mail.host =
unoconv_bin = C:\project\toko\env\Scripts\unoconv mail.port = 25
mail.password None SMTP password
modules = mail.tls = False
menus = /log:App-Log mail.ssl=False
mail.keyfile =
app_name = Base Opensipkd.com #SSL key file
allow_register = False mail.certfile =
# SSL certificate file
mail.queue_path =
# Location of maildir
mail.default_sender =
# Default from address
mail.debug = 0
# SMTP debug level
# mail.sendmail_app = /usr/sbin/sendmail
# Sendmail executable
# mail.sendmail_template =
# {sendmail_app} -t -i -f {sender} Template for sendmail execution
mail.debug_include_bcc = False
# Include Bcc headers when Debugging
# ODT to pdf configuration
unoconv_py =
# openoffice/libreoffice python executable
unoconv_bin =
# Python unoconv script path "/home/[apps]/env/bin/unoconv"
#Modules depreceated
modules =
# Menus to be appear in home page
menus = login:Login
log:App-Log
app_name = Your Aplocation Name
change_unit = False change_unit = False
departemen_chg_id = 3 departemen_chg_id = 3
# Register config parameter
allow_register = False
google-signin-client-id =
captcha_files=/home/aagusti/tmp
reg_captcha = 1
;reg_idcard = 1
reg_verify = 1
reg_form =
login_tpl =
;Digunakan Apabila Applikasi sebagai subdomain ;Digunakan Apabila Applikasi sebagai subdomain
;[app:main] diubah menjadi [app:opensipkd_base] ;[app:main] diubah menjadi [app:opensipkd_base]
;[filter:proxy-prefix] ;[filter:proxy-prefix]
......
...@@ -2,7 +2,7 @@ import os ...@@ -2,7 +2,7 @@ import os
from setuptools import setup, find_packages from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__)) here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst')) as f: with open(os.path.join(here, 'README.md')) as f:
README = f.read() README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f: with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read() CHANGES = f.read()
...@@ -30,8 +30,11 @@ requires = [ ...@@ -30,8 +30,11 @@ requires = [
'py3o.template', 'py3o.template',
'wheezy.captcha', 'wheezy.captcha',
'icecream', 'icecream',
'google-api-python-client', 'google', 'google-api-python-client',
'opensipkd-tools @git+https://git.opensipkd.com/aa.gusti/opensipkd-tools.git' 'google',
'pyjwt',
'z3c.rml'
'opensipkd-tools @git+https://git.opensipkd.com/aa.gusti/opensipkd-tools.git',
] ]
dev_requires = [ dev_requires = [
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!