- Requirements
- Step 1: Get the code
- Step 2: Use Composer to install dependencies
- Step 3: Create database
- Step 4: Install
- Step 5: Start Page
- Step 6: Configure Cron
- Optional: demosandbox
- Optional: Docker
- Optional: Command
Medcal has some server requirements for web hosting:
- PHP 7.1
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- Nginx or Apache web server
- MySQL server
- PHP Intl
git clone ...
cd medcal
php -d memory_limit=-1 composer.phar install
Once you finished the first two steps, you can create the MySQL database server. You must create the database with utf-8 collation (utf8_general_ci), for the application to work.
Copy the .env.example file to .env
cp .env.example .env
Edit the .env file and set the database configuration among the other settings.
Set the application key
php artisan key:generate
Edit all the Primary section parameters (for local/test/development environment)
Change the storage path in .env file to a writeable location
STORAGE_PATH=storage
For local environment you will need to comment out APP_DOMAIN, to keep it null
#APP_DOMAIN=
Back to your console, migrate database schema
php artisan migrate
Populate the database:
php artisan db:seed
Permissions
chmod -R 777 ./storage
chmod 777 ./public
for development
chmod -R 777 ./bootstrap/cache
Update geoip database:
php artisan vendor:publish --provider="Torann\GeoIP\GeoIPServiceProvider" --tag=config
php artisan geoip:update
And we are ready to go. Run the server:
php artisan serve
Type on web browser:
http://localhost:8000/
Congrats! You can now register as new user and log-in.
This is optional but totally recommended if you want automation capabilities.
Replace the artisan path with your valid installataion path, and make sure that it
runs with the permissions of your web server. In this case it's called nginx.
* * * * * nginx php /var/www/artisan schedule:run >> /dev/null 2>&1
To start you will need first install
yarn
or npm install
starting web serwer and queue worker
yarn start
yarn start-prod
yarn stop
yarn stop-prod
yarn delete
yarn delete-prod
To start cron
yarn cron
yarn cron-prod
yarn cron-delete
yarn-cron-prod-delete
Type on web browser:
http://localhost:1234/
If you want to try the application with a Lorem Ipsum database fixture.
php artisan db:seed --class=TestingDatabaseSeeder
Now you have two demo credentials to log in and play around.
USER: manager@example.org
PASS: demomanager
USER: guest@example.org
PASS: demoguest
cd docker/mysql
docker-compose up
if you use redis
cd docker/redis
docker-compose up
Type on console
php artisan serve --port 1234
php artisan queue:work
- Run tests
docker-compose run app /var/www/vendor/phpunit/phpunit/phpunit --configuration /var/www/phpunit.xml
Medcal should be available http://localhost
Type on console
Artisan command
php artisan view:clear
php artisan config:clear
php artisan cache:clear
pm2 command
yarn pm2 list
yarn pm2 delete {id}
yarn pm2 monit