Sign inSign up

gyengus/alpine-apache-php7-for-wordpress

By gyengus

Updated almost 7 years ago

Alpine LAP Server for WordPress page

Image
0

100K+

gyengus/alpine-apache-php7-for-wordpress repository overview

Alpine LAP Server for WordPress page

Docker Build Docker Stars Docker Pulls Donate

Based on ulsmith/alpine-apache-php7

Usage

Look at docker-compose.example.yml, it's a sample yml file for docker-compose. If you created a docker-compose.yml, you can run the image by the

docker-compose up -d

command.

Some changes in wp-config.php

First, need to determine the HTTP protocol

if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
    $scheme = "https";
    $_SERVER['HTTPS'] = 'on';
} else {
    $scheme = "http";
}

define('WP_SITEURL', $scheme . '://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', $scheme . '://' . $_SERVER['HTTP_HOST']);

define('WP_CONTENT_DIR', '/app/public/wp-content');
define('WP_CONTENT_URL', WP_HOME . '/wp-content');

Set the MySQL host name manual

define('DB_HOST', "mysql_host");

or automatic, if it runs on the Docker host

$tmp = explode(".", $_SERVER['SERVER_ADDR']);
$tmp[3] = "1";
define('DB_HOST', implode(".", $tmp));

Donations

  • PayPal: https://paypal.me/gyengus
  • Bitcoin: 1QJzLBK9uQP4RthmKJRQwy3v5sd4XS4S7P
  • Bitcoin Cash: qp04tazu4fe7lv6zr99suu40swqqp747nsm0kcfckv
  • Ethereum: 0x2bD68120A56acBf6Dbd11da2060228b8912C1e3C

Tag summary

Content type

Image

Digest

Size

77.5 MB

Last updated

almost 7 years ago

docker pull gyengus/alpine-apache-php7-for-wordpress