PHP 7 Phalcon image for creating micro services
10K+
Image is used for creating OpenClaps micro services. For easy use you can directly pull image from docker hub.
Image Registry : PHP 7 - Phalcon
Development machine dependencies are listed below:
Download Docker Engine
Linux : Oracle linux Subversion : 7-slim
Repo : oraclelinux:7-slim
Apache : 2.4.6 (Web Server)
Phalcon : 3.0 (Framework)
Refer: RPM distributions (i.e. CentOS) session for more information
Extensions
HTTPD_LOG_LEVEL warn [Default]
Supported Options:
- emerg
- alert
- crit
- error
- warn
- notice
- info
- debug
- trace1
- trace2
- trace3
- trace4
- trace5
- trace6
- trace7
- trace8
- HTTPD_BASEURL / [Support for application base url]
- HTTPD_SERVER_ADMIN [email protected] [Server admin email]
- HTTPD_HOST_NAME localhost [Host server name]
PHP_DISPLAY_ERROR_REPORTING OFF [Default]
Supported Options:
- E_ALL All
- E_ERROR
- E_WARNING
- E_PARSE
- E_DEPRECATED
- E_NOTICE
- E_CORE_ERROR
- E_CORE_WARNING
- E_COMPILE_ERROR
- E_COMPILE_WARNING
- E_USER_ERROR
- E_USER_WARNING
- E_USER_NOTICE
- PHP_DISPLAY_ERROR 0 [To display php error]
- PHP_TIMEZONE America/Los_Angeles [PHP timezone]
Working Dir : /web-root
All application dependecies are mounted under /ngs folder as
Log Channel: All following logs are channeled to STDOUT
Exposed Ports
Note: if you are running any other application in port 443, Change container port to another free port from host machine
Container Main Tread:
docker pull openclaps/php7-phalcon
docker run -p [your-port]:443 --name openclaps-php7 -v [your-app-path]:/web-root/app openclaps/php7-phalcon
Sample folder contain bootstarp code to kickstart new phalcon apps
- cd to "sample" folder
- Execute command "docker-compose up"
To stop & remove
- cd to "sample" folder
- Execute command "docker-compose down"
Load application in browser : https://localhost/api/robots
With custom port use
https://localhost:<your-port>
Example : If we need "webapp","redis" and "mongo" container to run in default network. Make following change in docker-compose.yml
webapp:
....
..
network_mode: bridge
links:
- mongo
- redis
..
.....
mongo:
....
...
volumes:
- ./app/data:/data/db
network_mode: bridge
redis:
....
...
container_name: redis
network_mode: bridge
"links" are deprecated feature from docker-compose please avoid using it.
Keep isolated custom network created by "docker-compose up" for each application.For data persistence map your data volume from your container images to "data" folder in application.Exclude "data" folder in .gitignore
For more docker specific commands please refer following documents
Dockerfile - Offical Document
docker-compose.yml - Official Document
Content type
Image
Digest
Size
110.5 MB
Last updated
over 8 years ago
docker pull openclaps/php7-phalcon