demio v1.11.0
Demio PHP application
Documentation
Fast Overview
Application working address - https://my.demio.com
Server OS
Backend technologies stack
PHP v7.0.17 (php-fpm + nginx)
Nginx v1.10.3
MariaDB v10.0.22 (MySQL)
Redis v3.0.5 (cache storage)
Beanstalkd (queues manager)
Supervisord (process manager)
Composer (packages manager)
Frontend built with:
HTML5, CSS3, JavaScript
Bower (packages manager)
yarn (packages manager)
Webpack v3.7.1
React.js v15.6.2
Babel v6.x (ES2015 compiler)
jQuery v2.2
Less CSS (CSS compiler)
Development Environment
Using docker and docker-compose for building localhost environment and development. You can find detailed instructions below in Developer Installation Guide section.
Developer Installation Guide
Clone git repo
git clone git@github.com:meetdemio/demio.git
Install docker engine on your localhost (https://docs.docker.com/engine/installation/)
Run in application directory:
docker-compose build
docker-compose up -d
Update /etc/hosts
file. Add next line
127.0.0.1 my.demio.loc
Connect to docker container:
docker exec -it demio bash
Install composer dependencies
composer install
Install yarn dependencies
yarn install
Install bower and webpack globally
yarn global add bower webpack
Install bower dependencies
bower install --allow-root
Start webpack
yarn dev
Now you can exit from docker container by exit
command.
Set write permissions to directories
sudo chmod -R a+w cache
sudo chmod -R a+w data/logs
Copy config/.env.example
to config/.env
:
cp config/.env.example config/.env
Open phpMyAdmin http://localhost:10820/index.php (look at phpMyAdmin section below) and import DB dump file data/dump/demio.sql
to demio database
Update your database dump with migrations. Connect to docker container again
docker exec -it demio bash
Execute DB migrations
php phinx migrate
Check user dashboard
Open in your browser http://my.demio.loc:8000
Demio dashboard credentials:
login: demio@demio.com
pass: Demio4life!
Release Environment
For Release environment use -f
param while building docker-compose
docker-compose -f docker-compose-release.yml build
docker-compose -f docker-compose-release.yml up -d
phpMyAdmin
http://localhost:10820/index.php
server: mysql
user: root
pass: 111
Beanstalkd Console
http://localhost:10831/?server=beanstalkd:11300
Deployment
Used https://deployer.org tool.
Deployer installation: https://deployer.org/docs/installation
Localhost deployment
Connect to docker container
docker exec -it demio bash
Run
dep update local
This operation will update composer, bower and yarn, then compile assets via webpack.
Staging deployment
Now you don't have to connect to docker container. Just run in the app directory
dep deploy staging
Production deployment
Next command will deploy application to all Production servers in PHP-cluster
dep deploy production
6 years ago