The local server package providers a local development environment for Helick projects. It is built on a containerized architecture using Docker images and Docker Compose to provide drop-in replacements for most components of the Cloud infrastructure.
Make sure all dependencies have been installed before moving on:
- PHP >= 7.1
- Composer
- Docker Desktop
Via Composer:
$ composer require helick/local-server --dev
To start the local server, simply run composer local-server start
. The first time you this will download all the necessary Docker images.
Once the initial install and download have completed, you should see the output:
Starting...
Creating network "docker_default" with the default driver
Creating volume "docker_mysql-data" with default driver
Creating volume "docker_elasticsearch-data" with default driver
Creating helick-skeleton-mysql ... done
Creating helick-skeleton-elasticsearch ... done
Creating helick-skeleton-proxy ... done
Creating helick-skeleton-php ... done
Creating helick-skeleton-phpmyadmin ... done
Creating helick-skeleton-nginx ... done
Started.
To access site please visit: http://helick-skeleton.localtest.me/
To access phpmyadmin please visit: http://phpmyadmin.helick-skeleton.localtest.me/
To access elasticsearch please visit: http://elasticsearch.helick-skeleton.localtest.me/
To stop the local server, simply run composer local-server stop
.
To destroy the local server, simply run composer local-server destroy
.
To get details on the running local server status, run composer local-server status
. You should see output similar to:
Name Command State Ports
--------------------------------------------------------------------------------------------------------------------------
helick-skeleton-elasticsearch /usr/local/bin/docker-entr ... Up (healthy) 9200/tcp, 9300/tcp
helick-skeleton-mysql docker-entrypoint.sh --def ... Up (healthy) 3306/tcp, 33060/tcp
helick-skeleton-nginx nginx -g daemon off; Up 80/tcp
helick-skeleton-php docker-php-entrypoint php-fpm Up 9000/tcp
helick-skeleton-phpmyadmin /run.sh supervisord -n -j ... Up 80/tcp, 9000/tcp
helick-skeleton-proxy /traefik Up 0.0.0.0:80->80/tcp, 0.0.0.0:8080->8080/tcp
All containers should have a status of "Up". If they do not, you can inspect the logs for each service by running composer local-server logs <service>
, for example, if docker_mysql_1
shows a status other than "Up", run composer local-server logs mysql
.
Often you'll want to access logs from the services that local server provides. For example, PHP errors logs, Nginx access logs, or MySQL logs. To do so, run the composer local-server logs <service>
command, where <service>
can be any of php
, nginx
, mysql
, elasticsearch
. This command will tail the logs (live update). To exit the log view, simply press Ctrl+C
.
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email evgenii@helick.io instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.