🐳 Docker Deployment
Install Docker Environment
docker Quick Deployment
Use the image emlog/emlog:pro-latest-php7.4-apache to quickly start emlog. This image includes the latest version of emlog, Apache service, and necessary extensions, but does not include MySQL. You need to install and create the database separately.
$ docker run --name emlog-pro -p 8080:80 -d emlog/emlog:pro-latest-php7.4-apache
docker-compose Deployment
-
Create a folder anywhere on your system; this document uses
~/emlogas an example.mkdir ~/emlog && cd ~/emlog -
Create
docker-compose.yamlwith the following content:version: '3'services:mysql:image: mysql/mysql-server:5.6container_name: mysql56command:- --default_authentication_plugin=mysql_native_password- --character-set-server=utf8mb4- --collation-server=utf8mb4_unicode_civolumes:- ./db_data/mysql:/var/lib/mysqlports:- "3306:3306"restart: alwaysenvironment:MYSQL_DATABASE: emlogMYSQL_USER: emlogMYSQL_PASSWORD: emlognetworks:- emlog_networkemlog:image: emlog/emlog:pro-latest-php7.4-apachecontainer_name: emlog-prorestart: alwaysenvironment:- EMLOG_DB_HOST=mysql- EMLOG_DB_NAME=emlog- EMLOG_DB_USER=emlog- EMLOG_DB_PASSWORD=emlog- EMLOG_DOMAIN_NAME=localhost- MAX_POST_BODY=50m- MAX_EXECUTION_TIME=300ports:- 80:80networks:- emlog_networkvolumes:- ./data:/applabels:createdBy: "Apps"networks:emlog_network:external: true -
Create Docker network
docker network create emlog_network -
Start emlog service
docker-compose up -d -
Access the deployed emlog site: http://localhost
Extended Environment Variables
| Variable Name | Description |
|---|---|
| MAX_POST_BODY | Corresponds to PHP upload_max_filesize and post_max_size settings |
| MAX_EXECUTION_TIME | Corresponds to PHP max_execution_time setting |
| EMLOG_DOMAIN_NAME | Site domain name eg: emlog.dev |