Skip to content

One-click WordPress deployment in production environment, saving time for small applications.

Notifications You must be signed in to change notification settings

KarsonJo/Wordpress.DockerCompose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

One-click WordPress deployment in production environment, saving time for small applications.

For a more detailed explanation please refer to my blog (in Chinese).

Features

  1. No torture, painless configuration
    1. No need to install database in advance
    2. No need to install PHP in advance
  2. Deployment scripts are simple to the extreme
  3. Ready for file upload
  4. Ready for installing plugins and themes
  5. No permissions problems
    • No weird "why can't I change the site language" problem.
  6. Nginx reverse proxy
    • Support HTTPS
    • Support HTTP redirection

Instructions

Requirements

  1. Docker

Configuration

Environment variables

Copy .env.template to .env and fill in the environment variables:

# Databse name for wordpress
DB_NAME=wordpress
# Database user name
DB_USER=wordpress
# Database user password
DB_PASSWORD=wordpress

# Your domain name
NGINX_HOST=wp.lndo.site

SSL Certificate

Replace the contents of the following files with your site's SSL certificate:

  • PRIVATE KEY: ./ssl/wp.key
  • CERTIFICATE: ./ssl/wp.pem

Modify file upload limits (optional)

By default, files up to 128MB are allowed to be uploaded. Modify ./php/php.ini if you want to change the limit:

file_uploads = On
memory_limit = 512M
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 600
client_max_body_size =  128M

Modify 128M to a greater value. And increase the memory limit and transfer time appropriately.

If you need to support uploading files exceeding 1G, open ./nginx/wp.conf.template and modify the client_max_body_size:

client_max_body_size 1G;

Deploy

docker compose up

Open your site in the browser and complete the setup. (Defaults to https://wp.lndo.site)

About

One-click WordPress deployment in production environment, saving time for small applications.

Topics

Resources

Stars

Watchers

Forks