ตอบ

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
ชื่อ:
อีเมล์:
หัวข้อ:
ไอค่อนข้อความ:

กันการสแปม
คำว่า "การท่องเที่ยว" มีตัว "ท" อยู่ทั้งหมดกี่ตัว (ตอบเป็นตัวเลข)


shortcuts: กด alt+s เพื่อตั้งกระทู้ หรือ alt+p แสดงตัวอย่าง


สรุปหัวข้อ

ข้อความโดย: su
« เมื่อ: 04/05/19 »

OpenSkedge


nstallation & Upgrading


Deployment on a Local, VPS, Cloud, or Dedicated host
Requirements
Nginx, Apache, or another web server on *nix/BSD with rewrite functionality. May work on Windows and Mac, but has not been tested and is not supported.
Nginx users, see this wiki article for setup.
Apache users, point your document root to web/. The .htaccess should take care of everything.
PHP 5.3.10+ (Tested on 5.3.10, 5.3.18, and 5.4.6)
PDO-supported database. MySQL/MariaDB suggested.
Composer for installing dependencies
(optional) Memcached and PHP memcache extension.
Installation
Run php app/check.php and resolve any errors before doing ANYTHING else.
Run cp app/config/parameters.yml.dist app/config/parameters.yml
sender_email is the email address of the automated email account you want to use.
secret is used for CSRF validation. Set this to some random characters. An ideal value would be a random sha256 hash.
The rest of the settings should be pretty self-explanatory.
Setup permissions. This will require ACL support of some kind on your file system. Replace www-data with your web server user.
If under a host that supports chmod +a (Mac OS X):
$ rm -rf app/cache/*
$ rm -rf app/logs/*
$ sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
$ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
If under a host that does not (Linux, BSD, other *nix), enable ACL support on the file system and run the following:
$ sudo setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX app/cache app/logs
$ sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
If none of the above are available options, add umask(0002); to the beginning of app/console, web/app.php, and web/app_dev.php
Run php composer.phar install
Run php app/console doctrine:database:create
Run php app/console doctrine:schema:update --force
Run php app/console doctrine:fixtures:load to bootstrap the application with some needed information (groups) and a default admin account with the username admin and the password admin.
Run php app/console --env=prod cache:clear to clear and warmup the application's cache. prod should be replaced with dev if you're running in a development environment.
Run php app/console --env=prod assetic:dump to dump assets. prod should be replaced with dev if you're running in a development environment.
Navigate to the OpenSkedge installation in a browser, login as the bootstrapped admin and change the password.
Add employees, areas, positions, and schedule periods and get to scheduling!
Upgrading
Run git pull to fetch the latest changes to OpenSkedge. If you've made changes to OpenSkedge, you'll either want to stash them or commit them and use git pull --rebase.
Run php composer.phar install
Run by using php app/console doctrine:migrations:migrate. NOTE: Only supports MySQL. This should be pretty safe but if issues occur, you should be able to roll back by migrating down. That said, it's probably best to test the migration on your development server before pushing it to production. Read more about using migrations at the Doctrine project's docs.
If you're on a database other than MySQL such as PostgreSQL, you'll have to adapt the migrations yourself, or risk potential data loss and/or application breakage by running php app/console doctrine:schema:update --force.
Run php app/console --env=prod cache:clear to clear and warmup the application's cache. prod should be replaced with dev if you're running in a development environment.
Run php app/console --env=prod assetic:dump to dump assets. prod should be replaced with dev if you're running in a development environment.
Deploying OpenSkedge on Pagoda Box
Pagoda Box is a PaaS (Platform-as-a-Service) provider that allows the creation of scalable instances of web applications.

OpenSkedge supports the use of the PaaS provider Pagoda Box and I have included a Boxfile and a Boxfile.install for the creation of OpenSkedge instances. Pagoda Box has a lot of limitations compared to a tradition style deployment platform, so deploying to Pagoda Box can be considered beta and unstable. Deployment may break occasionally (either because I broke something, Pagoda Box broke something, you broke something, or composer failed to fetch a package). You should check for any changes to this before updating a Pagoda Box instance as manual intervention may be required to keep the instance functioning.

Due to Pagoda Box's read-only nature, there are few environmental variables that need to be set:

SYMFONY__SENDER__EMAIL should contain the email address of the no-reply email account from which automated emails should be sent. - (Default: "no-reply@yourdomain.com")
OPENSKEDGE_SECRET is set to an insecure secret by default. This needs to be changed. OPENSKEDGE_SECRET is used for CSRF validation. Set this to some random characters. An ideal value would be a random sha256 hash. - (Default: ThisIsASecretChangeIt)
SYMFONY__MEMCACHE__EXPIRE should contain the number of seconds a user session should last. - (Default: 3600)
Any changes to the above will take effect the next time you deploy. You can also force a redeploy of the current commit by clicking "Pick a Git Commit to Deploy" and clicking "Deploy" next to the commit that is already deployed.

One can also use the Pagoda Box quickstart I created.

Suggested Reading for more information: http://help.pagodabox.com/customer/portal/articles/175128-symfony2