GithubHelp home page GithubHelp logo

evertramos / docker-wordpress Goto Github PK

View Code? Open in Web Editor NEW
484.0 22.0 153.0 65 KB

Wordpress Docker container using SSL Certificates with LetsEncrypt

Home Page: https://evertramos.github.io/docker-wordpress/

License: MIT License

Shell 100.00%
wordpress wordpress-development wordpress-deployment wordpress-site nginx-proxy docker-wordpress letsencrypt webproxy wp-cli docker

docker-wordpress's Introduction

Docker Wordpress πŸš€

wordpress-docker-letsencrypt

How to start πŸ”°

This script was designed to work along with Server Automation, where you will be able to start a new WordPress site in less than a minute. You may use directly with your NGINX Proxy Automation following the previous docs.

Known Issues πŸ’­

1. Azure

Running docker on Azure servers you must mount your database in your disks partitions (example: /mnt/data/) so your db container can work. This is a some kind of issue regarding Hyper-V sharing drivers... not really sure why.

=======

Versions

The versioning of this project matches the same tag of Server Automation and NGINX proxy automation.

Table of compatibility:

docker-wordpress nginx-proxy-automation server-automation
v0.5 v0.5 v0.5

docker-wordpress's People

Contributors

barbosacisco avatar evertramos avatar flothemaker avatar hadrien-toma avatar khalilgharbaoui avatar pathros avatar tawmeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-wordpress's Issues

Warning message: A number of scheduled tasks overdue.

Warning: WordPress has a number (4) of scheduled tasks which are overdue. Unless this is a development site, this probably means that the scheduler in your WordPress install is not working. Read this page for a guide to possible causes and how to fix it.

To recreate this problem, install the UpdraftPlus plugin and schedule automatic backups.
(I'm using Digital Ocean droplet and your docker-wordpress-letsencrypt.)

I'm guessing the issue is crons. I'm going to check to see if what this article says to do works: https://www.tring-web-design.co.uk/2016/02/wordpress-has-a-number-of-scheduled-tasks-which-are-overdue/
It says to add define('ALTERNATE_WP_CRON', true); to wp-config.php

I'll let it run for a day and then report back here to let you know if it fixed the problem.

How to change the domain of a container?

I have a wordpress setup which is made with this repo. lets say with domain example.com
The client want to switch his domain to notexample.com... I Could not figure out how to switch it without loosing data ? Any steps recommended here?

Cannot update plugins

Hello,

For every plugin I am trying to update, I get a message like:

An error occurred while updating Akismet Anti-Spam: Could not create directory.

This is of course related to folder permissions, but I've just followed the instructions in the README.md. Shouldn't it be aware of those issues and handle it all alone?

Anyone facing the same issue?

Website reset after container restart

Maybe this is not related to the way the docker container are built, but every time I start an instance, import a backup from WP-Clone eg. and then restart the container, the website is set back to its state before the backup.

Any tips?

wp-config.php missing configuration

Hi,

after running a fresh container the wp-config.php file is not set with the right data from the .env file. with the previous version it was working.
Could you please take a look on this?

SMTP settings

How can I configure the SMTP settings as environment variables?
I am getting the following error while sending emails from the application.
sh: 1: -t: not found

The wordpress file are not in https

When I'm trying to install wordpress I have many console errors:

Mixed Content: The page at 'https://www.domain.com/wp-admin/install.php?step=2' was loaded over HTTPS, but requested an insecure stylesheet 'http://www.domain.com/wp-includes/css/buttons.min.css?ver=4.9.6'. This request has been blocked; the content must be served over HTTPS. install.php?step=2:9

Mixed Content: The page at 'https://www.domain.com/wp-admin/install.php?step=2' was loaded over HTTPS, but requested an insecure stylesheet 'http://www.domain.com/wp-admin/css/install.min.css?ver=4.9.6'. This request has been blocked; the content must be served over HTTPS.
install.php?step=2:10

Mixed Content: The page at 'https://www.domain.com/wp-admin/install.php?step=2' was loaded over HTTPS, but requested an insecure stylesheet 'http://www.domain.com/wp-includes/css/dashicons.min.css?ver=4.9.6'. This request has been blocked; the content must be served over HTTPS.

Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure script ''. This request has been blocked; the content must be served over HTTPS.
install.php?step=2:115 Uncaught ReferenceError: jQuery is not defined at install.php?step=2:115
(anonymous) @ install.php?step=2:115

Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ''. This request has been blocked; the content must be served over HTTPS.

Usage of REPLACE_ environmental variables.

Hi there, first of all thanks for setting up this repo. It's helped tremendously for setting up my development environments.

I'm adapting this for my own use case where for each project, I spin up 3 wordpress instances (e.g. prod, staging, dev) while maintaining a single shared database container.

So far so good, but I cannot seem to find any usage / reference to the REPLACE_DB_SERVICE_NAME and REPLACE_SITE_SERVICE_NAME environmental variables found at the bottom of the .env.sample file:

# docker-compose service name
#
# This variables below are used for the automation process
# and must be the same name used in docker-composer.yml
REPLACE_DB_SERVICE_NAME=new-site-db
REPLACE_SITE_SERVICE_NAME=new-site-wordpress

I've looked in both this repo and the webproxy parent repo and can't seem to find any references to it.

Can you confirm whether or not this is still required as part of the usage?

Https: Error Connection

Hi,

I'm getting this error while accessing the site from https .

i think the reverse proxy is not working.

i have followed all the instructions .

Can you tell me what can be the problem.

Thank you :)

Wordpress Multisite question?

Slick pacakge! The integration with the proxy container image and how discovery works is very cool. One question as I'm learning this and adapting it to my environment, how do I get this and the auto-proxy to work with Wordpress Multisite (a single WP host serves up multiple domains / subdomains / sites). I might be missing seeing the settings to do that, but is there a way to pass an environment variable that says "this WP container hosts cat.com, dog.org, and fish.edu" and have the proxy configured automatically? Or do I need to ditch multisite and have each WP site hosted in it's own container for this to work?

Wordpress cant curl to itself

When the Server wants to do a Cron Job it says: cURL error 7: Failed to connect to domain.example port 443: Connection refused.

Otherwise everything else is working fine...

"Error establishing a database connection" while deploying the container, possible problem with passwords that have symbols

If you see the following message in a browser while you try to access your Wordpress instance:

Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at coders-cl-db:3306. This could mean your host’s database server is down.

    Are you sure you have the correct username and password?
    Are you sure you have typed the correct hostname?
    Are you sure the database server is running?

If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

It may be related to a password problem in MYSQL_ROOT_PASSWORD variable ((MYSQL_PASSWORD could suffer a similar problem but I haven't tested it).

I'm using your docker-compose.yml + .env.sample files to deploy a Wordpress environment.
After starting the containers for the first time (and waiting for the certs generation), if I surf to the server with a browser, I see the message above.

Steps done:

git clone https://github.com/evertramos/docker-wordpress-letsencrypt.git
cp .env.sample .env
nano .env #edit parameters, I'm using MariaDB 10.4 and Wordpress 5.4 tags.
docker-compose up -d

The following is a list of passwords that I have tested in terms of container working and showing the wizard. Passwords not working, are the ones that shows the error message shown above.
I still don't know if all of the working passwords shown in this list wil be exactly the same in the DB, because they may be truncated.

MYSQL_ROOT_PASSWORD=abc123             Works
MYSQL_ROOT_PASSWORD=abc"123            Works
MYSQL_ROOT_PASSWORD=abc"\123           Doesn't work. Notice that i'm not escaping the quote
MYSQL_ROOT_PASSWORD=abc"\\123          Works
MYSQL_ROOT_PASSWORD=abc"\\#123        Doesn't work
MYSQL_ROOT_PASSWORD="abc"\\#123"      Works, but, will the password be truncated to "abc"?
MYSQL_ROOT_PASSWORD="abc"\\#`Β΄'%&$ΒΏ?Β‘!@Β¬|-.,_:;{}[]+*Β¨()/'<>€·~Β½Β°123"      Doesn't work
MYSQL_ROOT_PASSWORD='abc"\\#123'       Doesn't work

I still don't know the correct way to set a password with symbols in a safe way. I expected that single quotes worked here, but it doesn't.

Docker-compose logs when the a bad password is being used:

Attaching to example-io-wordpress, docker-wordpress-letsencrypt_wpcli_1, example-io-db
example-io-db          | 2020-04-09 18:46:24+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.12+maria~bionic started.
example-io-db          | 2020-04-09 18:46:24+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
example-io-db          | 2020-04-09 18:46:24+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.12+maria~bionic started.
example-io-db          | 2020-04-09 18:46:25+00:00 [Note] [Entrypoint]: Initializing database files
example-io-db          | 
example-io-db          | 
example-io-db          | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
example-io-db          | To do so, start the server, then issue the following commands:
example-io-db          | 
example-io-db          | '/usr/bin/mysqladmin' -u root password 'new-password'
example-io-db          | '/usr/bin/mysqladmin' -u root -h  password 'new-password'
example-io-db          | 
example-io-db          | Alternatively you can run:
example-io-db          | '/usr/bin/mysql_secure_installation'
example-io-db          | 
example-io-db          | which will also give you the option of removing the test
example-io-db          | databases and anonymous user created by default.  This is
example-io-db          | strongly recommended for production servers.
example-io-db          | 
example-io-db          | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
example-io-db          | MySQL manual for more instructions.
example-io-db          | 
example-io-db          | Please report any problems at http://mariadb.org/jira
example-io-db          | 
example-io-db          | The latest information about MariaDB is available at http://mariadb.org/.
example-io-db          | You can find additional information about the MySQL part at:
example-io-db          | http://dev.mysql.com
example-io-db          | Consider joining MariaDB's strong and vibrant community:
example-io-db          | https://mariadb.org/get-involved/
example-io-db          | 
example-io-db          | 2020-04-09 18:46:27+00:00 [Note] [Entrypoint]: Database files initialized
example-io-db          | 2020-04-09 18:46:27+00:00 [Note] [Entrypoint]: Starting temporary server
example-io-db          | 2020-04-09 18:46:27+00:00 [Note] [Entrypoint]: Waiting for server startup
example-io-db          | 2020-04-09 18:46:27 0 [Note] mysqld (mysqld 10.4.12-MariaDB-1:10.4.12+maria~bionic) starting as process 124 ...
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: Using Linux native AIO
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: Uses event mutexes
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: Number of pools: 1
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: Using SSE2 crc32 instructions
example-io-db          | 2020-04-09 18:46:27 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: Completed initialization of buffer pool
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: Creating shared tablespace for temporary tables
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
example-io-db          | 2020-04-09 18:46:27 0 [Note] InnoDB: Waiting for purge to start
example-io-db          | 2020-04-09 18:46:28 0 [Note] InnoDB: 10.4.12 started; log sequence number 60972; transaction id 21
example-io-db          | 2020-04-09 18:46:28 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
example-io-db          | 2020-04-09 18:46:28 0 [Note] Plugin 'FEEDBACK' is disabled.
example-io-db          | 2020-04-09 18:46:28 0 [Warning] 'user' entry 'root@5d56367ea7db' ignored in --skip-name-resolve mode.
example-io-db          | 2020-04-09 18:46:28 0 [Warning] 'user' entry '@5d56367ea7db' ignored in --skip-name-resolve mode.
example-io-db          | 2020-04-09 18:46:28 0 [Warning] 'proxies_priv' entry '@% root@5d56367ea7db' ignored in --skip-name-resolve mode.
example-io-db          | 2020-04-09 18:46:28 0 [Note] InnoDB: Buffer pool(s) load completed at 200409 18:46:28
example-io-db          | 2020-04-09 18:46:28 0 [Note] Reading of all Master_info entries succeeded
example-io-db          | 2020-04-09 18:46:28 0 [Note] Added new Master_info '' to hash table
example-io-db          | 2020-04-09 18:46:28 0 [Note] mysqld: ready for connections.
example-io-db          | Version: '10.4.12-MariaDB-1:10.4.12+maria~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
example-io-db          | 2020-04-09 18:46:28+00:00 [Note] [Entrypoint]: Temporary server started.
example-io-db          | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
example-io-db          | ERROR 1064 (42000) at line 6: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%&$ΒΏ?Β‘!@Β¬|-.,_:' at line 1
example-io-db          | 2020-04-09 18:46:41+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.12+maria~bionic started.
example-io-db          | 2020-04-09 18:46:42+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
example-io-db          | 2020-04-09 18:46:42+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.12+maria~bionic started.
example-io-db          | 2020-04-09 18:46:42 0 [Note] mysqld (mysqld 10.4.12-MariaDB-1:10.4.12+maria~bionic) starting as process 1 ...
example-io-db          | 2020-04-09 18:46:43 0 [Note] mysqld: Aria engine: starting recovery
example-io-db          | recovered pages: 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% (0.2 seconds); tables to flush: 3 2 1 0
example-io-db          |  (0.0 seconds); 
example-io-db          | 2020-04-09 18:46:43 0 [Note] mysqld: Aria engine: recovery done
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Using Linux native AIO
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Uses event mutexes
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Number of pools: 1
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Using SSE2 crc32 instructions
example-io-db          | 2020-04-09 18:46:43 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Completed initialization of buffer pool
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=60972
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Creating shared tablespace for temporary tables
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Waiting for purge to start
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: 10.4.12 started; log sequence number 60981; transaction id 21
example-io-db          | 2020-04-09 18:46:43 0 [Note] Plugin 'FEEDBACK' is disabled.
example-io-db          | 2020-04-09 18:46:43 0 [Note] Server socket created on IP: '::'.
example-io-db          | 2020-04-09 18:46:43 0 [Warning] 'proxies_priv' entry '@% root@5d56367ea7db' ignored in --skip-name-resolve mode.
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
example-io-db          | 2020-04-09 18:46:43 0 [Note] Reading of all Master_info entries succeeded
example-io-db          | 2020-04-09 18:46:43 0 [Note] Added new Master_info '' to hash table
example-io-db          | 2020-04-09 18:46:43 0 [Note] mysqld: ready for connections.
example-io-db          | Version: '10.4.12-MariaDB-1:10.4.12+maria~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
example-io-db          | 2020-04-09 18:46:43 0 [Note] InnoDB: Buffer pool(s) load completed at 200409 18:46:43
example-io-db          | 2020-04-09 18:46:44 8 [Warning] Aborted connection 8 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.19' (This connection closed normally without authentication)
example-io-db          | 2020-04-09 18:46:47 9 [Warning] Aborted connection 9 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.19' (This connection closed normally without authentication)
example-io-db          | 2020-04-09 18:46:50 10 [Warning] Aborted connection 10 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.19' (This connection closed normally without authentication)
example-io-db          | 2020-04-09 18:46:53 11 [Warning] Aborted connection 11 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.19' (This connection closed normally without authentication)
example-io-db          | 2020-04-09 18:48:33 12 [Warning] Aborted connection 12 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.19' (This connection closed normally without authentication)
example-io-db          | 2020-04-09 18:53:41 13 [Warning] Aborted connection 13 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.19' (This connection closed normally without authentication)
example-io-wordpress   | WordPress not found in /var/www/html - copying now...
example-io-wordpress   | WARNING: /var/www/html is not empty! (copying anyhow)
example-io-wordpress   | Complete! WordPress has been successfully copied to /var/www/html
example-io-wordpress   | [09-Apr-2020 18:46:26 UTC] PHP Warning:  mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22
example-io-wordpress   | 
example-io-wordpress   | MySQL Connection Error: (2002) Connection refused
example-io-wordpress   | 
example-io-wordpress   | MySQL Connection Error: (2002) Connection refused
example-io-wordpress   | 
example-io-wordpress   | MySQL Connection Error: (2002) Connection refused
example-io-wordpress   | 
example-io-wordpress   | MySQL Connection Error: (2002) Connection refused
example-io-wordpress   | 
example-io-wordpress   | MySQL Connection Error: (2002) Connection refused
example-io-wordpress   | [09-Apr-2020 18:46:41 UTC] PHP Warning:  mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:41 UTC] PHP Warning:  mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in Standard input code on line 22
example-io-wordpress   | 
example-io-wordpress   | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Name or service not known
example-io-wordpress   | [09-Apr-2020 18:46:44 UTC] PHP Warning:  Packets out of order. Expected 0 received 1. Packet size=70 in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:44 UTC] PHP Warning:  mysqli::__construct(): MySQL server has gone away in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:44 UTC] PHP Warning:  mysqli::__construct(): Error while reading greeting packet. PID=198 in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:44 UTC] PHP Warning:  mysqli::__construct(): (HY000/2006): MySQL server has gone away in Standard input code on line 22
example-io-wordpress   | 
example-io-wordpress   | MySQL Connection Error: (2006) MySQL server has gone away
example-io-wordpress   | [09-Apr-2020 18:46:47 UTC] PHP Warning:  Packets out of order. Expected 0 received 1. Packet size=70 in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:47 UTC] PHP Warning:  mysqli::__construct(): MySQL server has gone away in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:47 UTC] PHP Warning:  mysqli::__construct(): Error while reading greeting packet. PID=198 in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:47 UTC] PHP Warning:  mysqli::__construct(): (HY000/2006): MySQL server has gone away in Standard input code on line 22
example-io-wordpress   | 
example-io-wordpress   | MySQL Connection Error: (2006) MySQL server has gone away
example-io-wordpress   | [09-Apr-2020 18:46:50 UTC] PHP Warning:  Packets out of order. Expected 0 received 1. Packet size=70 in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:50 UTC] PHP Warning:  mysqli::__construct(): MySQL server has gone away in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:50 UTC] PHP Warning:  mysqli::__construct(): Error while reading greeting packet. PID=198 in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:50 UTC] PHP Warning:  mysqli::__construct(): (HY000/2006): MySQL server has gone away in Standard input code on line 22
example-io-wordpress   | 
example-io-wordpress   | MySQL Connection Error: (2006) MySQL server has gone away
example-io-wordpress   | [09-Apr-2020 18:46:53 UTC] PHP Warning:  Packets out of order. Expected 0 received 1. Packet size=70 in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:53 UTC] PHP Warning:  mysqli::__construct(): MySQL server has gone away in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:53 UTC] PHP Warning:  mysqli::__construct(): Error while reading greeting packet. PID=198 in Standard input code on line 22
example-io-wordpress   | [09-Apr-2020 18:46:53 UTC] PHP Warning:  mysqli::__construct(): (HY000/2006): MySQL server has gone away in Standard input code on line 22
example-io-wordpress   | 
example-io-wordpress   | MySQL Connection Error: (2006) MySQL server has gone away
example-io-wordpress   | 
example-io-wordpress   | WARNING: unable to establish a database connection to 'example-io-db:3306'
example-io-wordpress   |   continuing anyways (which might have unexpected results)
example-io-wordpress   | 
example-io-wordpress   | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.19. Set the 'ServerName' directive globally to suppress this message
example-io-wordpress   | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.19. Set the 'ServerName' directive globally to suppress this message
example-io-wordpress   | [Thu Apr 09 18:46:53.557121 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.16 configured -- resuming normal operations
example-io-wordpress   | [Thu Apr 09 18:46:53.557385 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
example-io-wordpress   | 190.46.16.48 - - [09/Apr/2020:18:48:33 +0000] "GET / HTTP/1.1" 500 2953 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0"
example-io-wordpress   | 190.46.16.48 - - [09/Apr/2020:18:53:41 +0000] "GET / HTTP/1.1" 500 2953 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0"
wpcli_1               | Error: Error establishing a database connection.

Vanilla version of docker-wordpress-letsencrypt throws an exception during initializatin

I've cloned the following:

  • docker-compose-letsencrypt-nginx-proxy-companion
  • docker-wordpress-letsencrypt

I started the proxy "./start.sh" after renaming the .env.sample to .env with vanilla configuration (no other changes).
I then renamed the env file for the Wordpress project as well, updated the values for DOMAINS and LETSENCRYPT_EMAIL. Everything else has been untouched.

When I try to bring this up, I get this error. I already tried cleaning up my Docker environment with 'docker system prune -a'

$ docker-compose up
Pulling db (mariadb:latest)...
latest: Pulling from library/mariadb
898c46f3b1a1: Pull complete
63366dfa0a50: Pull complete
041d4cd74a92: Pull complete
6e1bee0f8701: Pull complete
0fa9bfc0c84b: Pull complete
8e9b088fe106: Pull complete
af96bccda5c4: Pull complete
0655ee57b408: Pull complete
58e50a9049b1: Pull complete
57cd7839e491: Pull complete
ba45434027be: Pull complete
17d364431c50: Pull complete
7d66b02d0312: Pull complete
25a55736429c: Pull complete
Pulling wordpress (wordpress:latest)...
latest: Pulling from library/wordpress
27833a3ba0a5: Already exists
2d79f6773a3c: Pull complete
f5dd9a448b82: Pull complete
95719e57e42b: Pull complete
cc75e951030f: Pull complete
78873f480bce: Pull complete
1b14116a29a2: Pull complete
6ebd896c320d: Pull complete
5f2951bfeefd: Pull complete
4d7e173cc574: Pull complete
87ea8937aa18: Pull complete
e117c62ba700: Pull complete
e9f1069509f7: Pull complete
3ba473f4bcf1: Pull complete
a6af622a5d28: Pull complete
13618a8bb48c: Pull complete
cfdecacba081: Pull complete
70f5b1fbb18a: Pull complete
95fc3e5c5bad: Pull complete
Creating db ... done
Creating wordpress ... done
Attaching to db, wordpress
db           | Initializing database
db           | 2019-04-03 17:57:22 0 [Warning] InnoDB: Retry attempts for writing partial data failed.
db           | 2019-04-03 17:57:22 0 [ERROR] InnoDB: Write to file ./ibdata1 failed at offset 0, 1048576 bytes should have been written, only 0 were written. Operating system error number 22. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
db           | 2019-04-03 17:57:22 0 [ERROR] InnoDB: Error number 22 means 'Invalid argument'
db           | 2019-04-03 17:57:22 0 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space
db           | 2019-04-03 17:57:22 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete
the ibdata1 file before trying to start up again.
wordpress    | WordPress not found in /var/www/html - copying now...
wordpress    | WARNING: /var/www/html is not empty! (copying anyhow)
db           | 2019-04-03 17:57:23 0 [ERROR] Plugin 'InnoDB' init function returned error.
db           | 2019-04-03 17:57:23 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db           | 2019-04-03 17:57:23 0 [ERROR] Unknown/unsupported storage engine: InnoDB
db           | 2019-04-03 17:57:23 0 [ERROR] Aborting
db           |
db           |
db           | Installation of system tables failed!  Examine the logs in
db           | /var/lib/mysql/ for more information.
db           |
db           | The problem could be conflicting information in an external
db           | my.cnf files. You can ignore these by doing:
db           |
db           |     shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
db           |
db           | You can also try to start the mysqld daemon with:
db           |
db           |     shell> /usr/sbin/mysqld --skip-grant-tables --general-log &
db           |
db           | and use the command line tool /usr/bin/mysql
db           | to connect to the mysql database and look at the grant tables:
db           |
db           |     shell> /usr/bin/mysql -u root mysql
db           |     mysql> show tables;
db           |
db           | Try 'mysqld --help' if you have problems with paths.  Using
db           | --general-log gives you a log in /var/lib/mysql/ that may be helpful.
db           |
db           | The latest information about mysql_install_db is available at
db           | https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
db           | You can find the latest source at https://downloads.mariadb.org and
db           | the maria-discuss email list at https://launchpad.net/~maria-discuss
db           |
db           | Please check all of the above before submitting a bug report
db           | at http://mariadb.org/jira
db           |
db           | 2019-04-03 17:57:27 0 [Note] mysqld (mysqld 10.3.14-MariaDB-1:10.3.14+maria~bionic) starting as process 1 ...
db           | 2019-04-03 17:57:27 0 [Note] InnoDB: Using Linux native AIO
db           | 2019-04-03 17:57:27 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db           | 2019-04-03 17:57:27 0 [Note] InnoDB: Uses event mutexes
db           | 2019-04-03 17:57:27 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db           | 2019-04-03 17:57:27 0 [Note] InnoDB: Number of pools: 1
db           | 2019-04-03 17:57:27 0 [Note] InnoDB: Using SSE2 crc32 instructions
db           | 2019-04-03 17:57:27 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db           | 2019-04-03 17:57:27 0 [Note] InnoDB: Completed initialization of buffer pool
db           | 2019-04-03 17:57:28 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be
changed. See the man page of setpriority().
db           | 2019-04-03 17:57:28 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
db           | 2019-04-03 17:57:28 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
db           | 2019-04-03 17:57:28 0 [Note] InnoDB: Starting shutdown...
db           | 2019-04-03 17:57:28 0 [ERROR] Plugin 'InnoDB' init function returned error.
db           | 2019-04-03 17:57:28 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db           | 2019-04-03 17:57:28 0 [Note] Plugin 'FEEDBACK' is disabled.
db           | 2019-04-03 17:57:28 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
db           | 2019-04-03 17:57:28 0 [ERROR] Unknown/unsupported storage engine: InnoDB
db           | 2019-04-03 17:57:28 0 [ERROR] Aborting
db           |
db exited with code 1
wordpress    | Complete! WordPress has been successfully copied to /var/www/html
wordpress    | [03-Apr-2019 17:57:33 UTC] PHP Warning:  mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22
wordpress    |
wordpress    | MySQL Connection Error: (2002) Connection refused
db           | 2019-04-03 17:57:33 0 [Note] mysqld (mysqld 10.3.14-MariaDB-1:10.3.14+maria~bionic) starting as process 1 ...
db           | 2019-04-03 17:57:34 0 [Note] InnoDB: Using Linux native AIO
db           | 2019-04-03 17:57:34 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db           | 2019-04-03 17:57:34 0 [Note] InnoDB: Uses event mutexes
db           | 2019-04-03 17:57:34 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db           | 2019-04-03 17:57:34 0 [Note] InnoDB: Number of pools: 1
db           | 2019-04-03 17:57:34 0 [Note] InnoDB: Using SSE2 crc32 instructions
db           | 2019-04-03 17:57:34 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db           | 2019-04-03 17:57:34 0 [Note] InnoDB: Completed initialization of buffer pool
db           | 2019-04-03 17:57:34 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be
changed. See the man page of setpriority().
db           | 2019-04-03 17:57:34 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
db           | 2019-04-03 17:57:34 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
db           | 2019-04-03 17:57:34 0 [Note] InnoDB: Starting shutdown...
db           | 2019-04-03 17:57:34 0 [ERROR] Plugin 'InnoDB' init function returned error.
db           | 2019-04-03 17:57:34 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db           | 2019-04-03 17:57:34 0 [Note] Plugin 'FEEDBACK' is disabled.
db           | 2019-04-03 17:57:34 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
db           | 2019-04-03 17:57:34 0 [ERROR] Unknown/unsupported storage engine: InnoDB
db           | 2019-04-03 17:57:34 0 [ERROR] Aborting
db           |
db exited with code 1
db           | 2019-04-03 17:57:39 0 [Note] mysqld (mysqld 10.3.14-MariaDB-1:10.3.14+maria~bionic) starting as process 1 ...
db           | 2019-04-03 17:57:39 0 [Note] InnoDB: Using Linux native AIO
db           | 2019-04-03 17:57:39 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db           | 2019-04-03 17:57:39 0 [Note] InnoDB: Uses event mutexes
db           | 2019-04-03 17:57:39 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db           | 2019-04-03 17:57:39 0 [Note] InnoDB: Number of pools: 1
db           | 2019-04-03 17:57:39 0 [Note] InnoDB: Using SSE2 crc32 instructions
db           | 2019-04-03 17:57:39 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db           | 2019-04-03 17:57:39 0 [Note] InnoDB: Completed initialization of buffer pool
db           | 2019-04-03 17:57:39 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be
changed. See the man page of setpriority().
db           | 2019-04-03 17:57:39 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
db           | 2019-04-03 17:57:39 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
wordpress    |
wordpress    | MySQL Connection Error: (2002) Connection refused
db           | 2019-04-03 17:57:40 0 [Note] InnoDB: Starting shutdown...
db           | 2019-04-03 17:57:40 0 [ERROR] Plugin 'InnoDB' init function returned error.
db           | 2019-04-03 17:57:40 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db           | 2019-04-03 17:57:40 0 [Note] Plugin 'FEEDBACK' is disabled.
db           | 2019-04-03 17:57:40 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
db           | 2019-04-03 17:57:40 0 [ERROR] Unknown/unsupported storage engine: InnoDB
db           | 2019-04-03 17:57:40 0 [ERROR] Aborting
db           |
db exited with code 1
wordpress    |
wordpress    | MySQL Connection Error: (2002) Connection refused
db           | 2019-04-03 17:57:45 0 [Note] mysqld (mysqld 10.3.14-MariaDB-1:10.3.14+maria~bionic) starting as process 1 ...
db           | 2019-04-03 17:57:45 0 [Note] InnoDB: Using Linux native AIO
db           | 2019-04-03 17:57:45 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db           | 2019-04-03 17:57:45 0 [Note] InnoDB: Uses event mutexes
db           | 2019-04-03 17:57:45 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db           | 2019-04-03 17:57:45 0 [Note] InnoDB: Number of pools: 1
db           | 2019-04-03 17:57:45 0 [Note] InnoDB: Using SSE2 crc32 instructions
db           | 2019-04-03 17:57:45 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db           | 2019-04-03 17:57:45 0 [Note] InnoDB: Completed initialization of buffer pool
db           | 2019-04-03 17:57:45 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be
changed. See the man page of setpriority().
db           | 2019-04-03 17:57:45 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
db           | 2019-04-03 17:57:45 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
db           | 2019-04-03 17:57:46 0 [Note] InnoDB: Starting shutdown...
db           | 2019-04-03 17:57:46 0 [ERROR] Plugin 'InnoDB' init function returned error.
db           | 2019-04-03 17:57:46 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db           | 2019-04-03 17:57:46 0 [Note] Plugin 'FEEDBACK' is disabled.
db           | 2019-04-03 17:57:46 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
db           | 2019-04-03 17:57:46 0 [ERROR] Unknown/unsupported storage engine: InnoDB
db           | 2019-04-03 17:57:46 0 [ERROR] Aborting
db           |
wordpress    | [03-Apr-2019 17:57:47 UTC] PHP Warning:  mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in Standard input code on line 22
wordpress    | [03-Apr-2019 17:57:47 UTC] PHP Warning:  mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in Standard input code on line 22
wordpress    |
wordpress    | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Name or service not known
db exited with code 1
wordpress    | [03-Apr-2019 17:57:51 UTC] PHP Warning:  mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22
wordpress    |
wordpress    | MySQL Connection Error: (2002) Connection refused
db           | 2019-04-03 17:57:52 0 [Note] mysqld (mysqld 10.3.14-MariaDB-1:10.3.14+maria~bionic) starting as process 1 ...
db           | 2019-04-03 17:57:52 0 [Note] InnoDB: Using Linux native AIO
db           | 2019-04-03 17:57:52 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db           | 2019-04-03 17:57:52 0 [Note] InnoDB: Uses event mutexes
db           | 2019-04-03 17:57:52 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db           | 2019-04-03 17:57:52 0 [Note] InnoDB: Number of pools: 1
db           | 2019-04-03 17:57:52 0 [Note] InnoDB: Using SSE2 crc32 instructions
db           | 2019-04-03 17:57:52 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db           | 2019-04-03 17:57:52 0 [Note] InnoDB: Completed initialization of buffer pool
db           | 2019-04-03 17:57:52 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be
changed. See the man page of setpriority().
db           | 2019-04-03 17:57:52 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
db           | 2019-04-03 17:57:52 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
db           | 2019-04-03 17:57:53 0 [Note] InnoDB: Starting shutdown...
db           | 2019-04-03 17:57:53 0 [ERROR] Plugin 'InnoDB' init function returned error.
db           | 2019-04-03 17:57:53 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db           | 2019-04-03 17:57:53 0 [Note] Plugin 'FEEDBACK' is disabled.
db           | 2019-04-03 17:57:53 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
db           | 2019-04-03 17:57:53 0 [ERROR] Unknown/unsupported storage engine: InnoDB
db           | 2019-04-03 17:57:53 0 [ERROR] Aborting
db           |
wordpress    | [03-Apr-2019 17:57:54 UTC] PHP Warning:  mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in Standard input code on line 22
wordpress    | [03-Apr-2019 17:57:54 UTC] PHP Warning:  mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in Standard input code on line 22
wordpress    |
wordpress    | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Name or service not known
db exited with code 1
wordpress    | [03-Apr-2019 17:58:00 UTC] PHP Warning:  mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22
wordpress    |
wordpress    | MySQL Connection Error: (2002) Connection refused
db           | 2019-04-03 17:58:00 0 [Note] mysqld (mysqld 10.3.14-MariaDB-1:10.3.14+maria~bionic) starting as process 1 ...
db           | 2019-04-03 17:58:01 0 [Note] InnoDB: Using Linux native AIO
db           | 2019-04-03 17:58:01 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db           | 2019-04-03 17:58:01 0 [Note] InnoDB: Uses event mutexes
db           | 2019-04-03 17:58:01 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db           | 2019-04-03 17:58:01 0 [Note] InnoDB: Number of pools: 1
db           | 2019-04-03 17:58:01 0 [Note] InnoDB: Using SSE2 crc32 instructions
db           | 2019-04-03 17:58:01 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db           | 2019-04-03 17:58:01 0 [Note] InnoDB: Completed initialization of buffer pool
db           | 2019-04-03 17:58:01 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be
changed. See the man page of setpriority().
db           | 2019-04-03 17:58:01 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
db           | 2019-04-03 17:58:01 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
db           | 2019-04-03 17:58:01 0 [Note] InnoDB: Starting shutdown...
db           | 2019-04-03 17:58:01 0 [ERROR] Plugin 'InnoDB' init function returned error.
db           | 2019-04-03 17:58:01 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db           | 2019-04-03 17:58:01 0 [Note] Plugin 'FEEDBACK' is disabled.
db           | 2019-04-03 17:58:01 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
db           | 2019-04-03 17:58:01 0 [ERROR] Unknown/unsupported storage engine: InnoDB
db           | 2019-04-03 17:58:01 0 [ERROR] Aborting
db           |
db exited with code 1
wordpress    | [03-Apr-2019 17:58:03 UTC] PHP Warning:  mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in Standard input code on line 22
wordpress    | [03-Apr-2019 17:58:03 UTC] PHP Warning:  mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in Standard input code on line 22
wordpress    |
wordpress    | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Name or service not known
wordpress    | [03-Apr-2019 17:58:06 UTC] PHP Warning:  mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in Standard input code on line 22
wordpress    | [03-Apr-2019 17:58:06 UTC] PHP Warning:  mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in Standard input code on line 22
wordpress    |
wordpress    | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Name or service not known
wordpress    | [03-Apr-2019 17:58:13 UTC] PHP Warning:  mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22
wordpress    |
wordpress    | MySQL Connection Error: (2002) Connection refused
wordpress    |
wordpress    | WARNING: unable to establish a database connection to 'db:3306'
wordpress    |   continuing anyways (which might have unexpected results)
wordpress    |
db           | 2019-04-03 17:58:14 0 [Note] mysqld (mysqld 10.3.14-MariaDB-1:10.3.14+maria~bionic) starting as process 1 ...
db           | 2019-04-03 17:58:14 0 [Note] InnoDB: Using Linux native AIO
db           | 2019-04-03 17:58:14 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db           | 2019-04-03 17:58:14 0 [Note] InnoDB: Uses event mutexes
db           | 2019-04-03 17:58:14 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db           | 2019-04-03 17:58:14 0 [Note] InnoDB: Number of pools: 1
db           | 2019-04-03 17:58:14 0 [Note] InnoDB: Using SSE2 crc32 instructions
db           | 2019-04-03 17:58:14 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db           | 2019-04-03 17:58:14 0 [Note] InnoDB: Completed initialization of buffer pool
db           | 2019-04-03 17:58:14 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be
changed. See the man page of setpriority().
db           | 2019-04-03 17:58:14 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
db           | 2019-04-03 17:58:14 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
wordpress    | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.23.0.6. Set the 'ServerName' directive globally to suppress this message
db           | 2019-04-03 17:58:15 0 [Note] InnoDB: Starting shutdown...
wordpress    | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.23.0.6. Set the 'ServerName' directive globally to suppress this message
db           | 2019-04-03 17:58:15 0 [ERROR] Plugin 'InnoDB' init function returned error.
db           | 2019-04-03 17:58:15 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db           | 2019-04-03 17:58:15 0 [Note] Plugin 'FEEDBACK' is disabled.
db           | 2019-04-03 17:58:15 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
db           | 2019-04-03 17:58:15 0 [ERROR] Unknown/unsupported storage engine: InnoDB
db           | 2019-04-03 17:58:15 0 [ERROR] Aborting
db           |
wordpress    | [Wed Apr 03 17:58:15.347970 2019] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.2.16 configured
-- resuming normal operations
wordpress    | [Wed Apr 03 17:58:15.348006 2019] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
db exited with code 1
Gracefully stopping... (press Ctrl+C again to force)
Stopping wordpress ... done
Stopping db        ... done

Split DB and WP service declarations into a separate docker-compose file

This is not a bug, and I know this is not quite the place to ask for it, but I'd like to know your thoughts about something:

I have your build up and running, thanks to your help the other day.

I got this idea to create a separate directory for each of the WP websites and database, because it makes sense to have a separate container for each website. And I'd like to share the same db service between them.

But I'm not sure about how do I'd handle this, or how can I reference a db service that is declared in the db dir into "blog1" and "blog2"directories, for example. Can that be done? If so, how? And does this makes sense, that is, to share the same db service between websites, if the target is to be more efficient on the server resources (my VPS is limited to 2gb ram)?

Any help would be awesome!

This is what I have ATM:

    .
    β”œβ”€β”€ nginx-proxy
    β”‚Β Β  └── docker-compose.yml
    └── blogs
     Β Β  └── docker-compose.yml

docker-compose.yml

    version: "3"
    
    services:
      db:
        container_name: ${CONTAINER_DB_NAME}
        image: mariadb:latest
        restart: unless-stopped
        volumes:
          - ${DB_PATH}:/var/lib/mysql
        environment:
          MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
          MYSQL_DATABASE: ${MYSQL_DATABASE}
          MYSQL_USER: ${MYSQL_USER}
          MYSQL_PASSWORD: ${MYSQL_PASSWORD}
    
      wordpress1:
        depends_on:
          - db
        container_name: ${CONTAINER_WP_NAME1}
        image: wordpress:latest
        restart: unless-stopped
        volumes:
          - ${WP_CORE}:/var/www/html
          - ${WP_CONTENT}:/var/www/html/wp-content
          - ./conf.d/php.ini:/usr/local/etc/php/conf.d/php.ini
        environment:
          WORDPRESS_DB_HOST: ${CONTAINER_DB_NAME1}:3306
          WORDPRESS_DB_NAME: ${MYSQL_DATABASE1}
          WORDPRESS_DB_USER: ${MYSQL_USER1}
          WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD1}
          WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX1}
          VIRTUAL_HOST: ${DOMAINS1}
          LETSENCRYPT_HOST: ${DOMAINS1}
          LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL1}
        logging:
          options:
            max-size: ${LOGGING_OPTIONS_MAX_SIZE1:-200k}
    
      wordpress2:
        depends_on:
          - db
        container_name: ${CONTAINER_WP_NAME2}
        image: wordpress:latest
        restart: unless-stopped
        volumes:
          - ${WP_CORE}:/var/www/html
          - ${WP_CONTENT}:/var/www/html/wp-content
          - ./conf.d/php.ini:/usr/local/etc/php/conf.d/php.ini
        environment:
          WORDPRESS_DB_HOST: ${CONTAINER_DB_NAME2}:3306
          WORDPRESS_DB_NAME: ${MYSQL_DATABASE2}
          WORDPRESS_DB_USER: ${MYSQL_USER2}
          WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD2}
          WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX2}
          VIRTUAL_HOST: ${DOMAINS2}
          LETSENCRYPT_HOST: ${DOMAINS2}
          LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL2}
        logging:
          options:
            max-size: ${LOGGING_OPTIONS_MAX_SIZE2:-200k}
    
    networks:
      default:
        external:
          name: ${NETWORK}

And this is where I want to be:

    .
    β”œβ”€β”€ db
    β”‚Β Β  └── docker-compose.yml
    β”œβ”€β”€ blog1
    β”‚Β Β  └── docker-compose.yml
    β”œβ”€β”€ blog2
    β”‚   └── docker-compose.yml
    └── blog3
        └── docker-compose.yml

db container

    version: "3"
    
    services:
      db:
        container_name: ${CONTAINER_DB_NAME}
        image: mariadb:latest
        restart: unless-stopped
        volumes:
          - ${DB_PATH}:/var/lib/mysql
        environment:
          MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
          MYSQL_DATABASE: ${MYSQL_DATABASE}
          MYSQL_USER: ${MYSQL_USER}
          MYSQL_PASSWORD: ${MYSQL_PASSWORD}
    networks:
      default:
        external:
          name: ${NETWORK}

blog1 container (blog2, blog3 and so on)

    version: "3"
    
    services:
      wordpress1:
        depends_on:
          - db // Does Docker knows this is db service I created outside it?
        container_name: ${CONTAINER_WP_NAME1}
        image: wordpress:latest
        restart: unless-stopped
        volumes:
            - ${WP_CORE}:/var/www/html
            - ${WP_CONTENT}:/var/www/html/wp-content
            - ./conf.d/php.ini:/usr/local/etc/php/conf.d/php.ini
        environment:
            WORDPRESS_DB_HOST: ${CONTAINER_DB_NAME1}:3306
            WORDPRESS_DB_NAME: ${MYSQL_DATABASE1}
            WORDPRESS_DB_USER: ${MYSQL_USER1}
            WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD1}
            WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX1}
            VIRTUAL_HOST: ${DOMAINS1}
            LETSENCRYPT_HOST: ${DOMAINS1}
            LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL1}
        logging:
            options:
            max-size: ${LOGGING_OPTIONS_MAX_SIZE1:-200k}
    networks:
      default:
        external:
          name: ${NETWORK}

502 Bad Gateway error

Have followed this to the letter and this is the fourth consecutive time I am getting either 502 or 504 gateway errors.

Have previously setup a working ghost-blog container following:
https://blog.mathewmerrick.com/2017/09/19/docker-nginx-letsencrypt-ghost/

This confirms that the nginx proxy is working as it should.

The only other thing of note is that docker ps -a shows that the wordpress container keeps trying to restart for some reason?!

Any thoughts?

Best way of integrating Phpmyadmin with Wordpress nginx-proxy letsencrypt configuration

It's in the question. I'm looking for a way to extend this awesome package that is the wordpress-nginxproxy-letsencrypt to add a phpmyadmin container.

Do you have some advice or a guide to do it the good way.

For now here is what i tried with a docker-compose.yml file :

version: '3'
services:
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: phpmyadmin
    # environment:
    #   - PMA_ARBITRARY=1
    restart: always
    ports:
      - 8080:80
    volumes:
      - /path/to/sessions
    links:
      - website1_db:db
      - website2_db:db
networks:
  default:
    external:
      name: webproxy

I commented out the arbitrary part because i could not connect.
Even without it though the container returns the error message ERROR: Service 'phpmyadmin' has a link to service 'website_1:db' which is undefined. I thought i was doing it right.

I tried also to do it through a simple command for a single db container and it worked. I think i'm close but i can't figure out the rest :(

docker run --name website1_admin --link=website1_db:db -p 8080:80 --network=webproxy phpmyadmin/phpmyadmin

I could obviously do this for every wordpress/db install but i feel that it is a waste of resources.. am i right or it does not matter ?
Also, i can't find a way to force the access to a certain url (and ideally https). Could we think of something together?

Get rid of Apache web server in favor of nginx

Hello,

Current implementation uses wordpress:latest docker image, which uses Apache web server internally. So, we have the following request flow:

user browser -> nginx -> apache -> php -> wordpress 

it would be nice to get rid of Apache web server. Probably, we may reuse nginx, which we have because of nginx-proxy-companion. In that case we will have the following flow:

user browser -> nginx -> php fpm -> wordpress

This change reduces needed computational resources.

nginx error importing old blog (502 Bad Gateway)

With a fresh install I have imported a wordpress.com blog through Wordpress importer and the generated xml file.

After few seconds (maybe few minutes) I got an error:

502 Bad Gateway

Looking in nginx logs files I can see:

 2018/07/06 16:56:37 [error] 18#18: *29 upstream prematurely closed connection while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: xxx, request: "POST /wp-admin/admin.php?import=wordpress&step=2 HTTP/2.0", upstream: "http://172.18.0.6:80/wp-admin/admin.php?import=wordpress&step=2", host: "xxx", referrer: "https://xxx.xx/wp-admin/admin.php?import=wordpress&step=1&_wpnonce=c9e9bc6704"

Could anybody help me?

413 Request Entity Too Large

I'm trying to upload a large plugin and it won't let me. I'm getting an nginx error page.

To recreate: Upload a plugin using wordpress's plugin uploader. The one I used is 4.3 MB. (.zip)

I'm thinking the solution would be to increase php limits, but they are already high enough in your default uploadsize.ini file.

Thanks for your work on this. It's awesome!

Problems when creating a second WordPress

Hello,
I have created another WordPress on the same machine and it is well generated and I have both installed, but randomly the first wordpress loses the connection with the database of its docker.

If I deactivate the second wordpress, the first works perfectly.

Thanks for the help.

docker-compose.yml com nginx-proxy

tenho esse docker-compose, jΓ‘ estΓ‘ ok para funcionar um WordPress

version: '3'

services:

   nginx-proxy:
    image: jwilder/nginx-proxy
    container_name: nginx-proxy
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./data/certs:/etc/nginx/certs:ro
      - /etc/nginx/vhost.d
      - /usr/share/nginx/html
      - /var/run/docker.sock:/tmp/docker.sock:ro

  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "./data/certs:/etc/nginx/certs:rw"
    environment:
      NGINX_DOCKER_GEN_CONTAINER: nginx-proxy

  wp-db:
    image: mariadb:latest
    container_name: wp-db
    volumes:
      - ./data/banco:/var/lib/mysql
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: root_password

  wp-api:
    image: wordpress:4.8
    container_name: wp-api
    restart: unless-stopped
    volumes:
      - ./data/wordpress:/var/www/html
      - ./data/wordpress/wp-content:/var/www/html/wp-content
    environment:
      WORDPRESS_DB_PASSWORD: user_password
      VIRTUAL_HOST: site.com.br, www.site.com.br
      LETSENCRYPT_HOST: site.com.br, www.site.com.br
      LETSENCRYPT_EMAIL: [email protected]

wordpress 6.0.2 and mysql 8.0

maybe a bug?
when I try to combine wordpress 6.0.2 and mysql 8.0 in the wordpress/.env file
./new-site.sh, was successful but the docker ps command tells the mysql db is restarting in a loop.

(I have also the ✘ ERROR You dont have permission to write log at '/var/log/basescript.log' during scripts execution.)

Wordpress 6.0.2 and mysql 5.7 is working fine.

I'm working on an ovh vps with ubuntu 22.04 version.

Second wordpress site destroy first container i made

Hi

when i use docker-comose up for make a second website with wordpress i change all the variable on .ENV file Container name, path and domain.

it s say "recreating myfirstname container" destroy my frist container and build new with new name that ??

someone have same ?

Use wordpress-fpm

Hi,
thank you for your work !
I noticed that you used the image wordpress:latest which contains apache server. Is it possible to use another wordpress image, such as php7.0-fpm, to use it directly with nginx?

Best !

Wordpress : Specifying Environment variables

Hello Evert and nice job one more time!

Would it be possible to find a solution to add environment variables like bitnami images such as:

User and Site configuration

  • WORDPRESS_USERNAME: WordPress application username.
  • WORDPRESS_PASSWORD: WordPress application password.
  • WORDPRESS_EMAIL: WordPress application email. Default: [email protected]
  • WORDPRESS_FIRST_NAME: WordPress user first name. Default: FirstName
  • WORDPRESS_LAST_NAME: WordPress user last name. Default: LastName
  • WORDPRESS_BLOG_NAME: WordPress blog name. Default: User's blog

SMTP Configuration

  • SMTP_HOST: Host for outgoing SMTP email. No defaults.
  • SMTP_PORT: Port for outgoing SMTP email. No defaults.
  • SMTP_USER: User of SMTP used for authentication (likely email). No defaults.
  • SMTP_PASSWORD: Password for SMTP. No defaults.
  • SMTP_PROTOCOL: Secure connection protocol to use for SMTP [tls, ssl, none]. No defaults.

This would be an example of User and Site and SMTP configuration using a GMail account:

Docker-compose.yml :

WORDPRESS_USERNAME= ${WORDPRESS_USERNAME}
WORDPRESS_PASSWORD= ${WORDPRESS_PASSWORD}
WORDPRESS_EMAIL= ${WORDPRESS_EMAIL}
WORDPRESS_FIRST_NAME= ${WORDPRESS_FIRST_NAME}
WORDPRESS_LAST_NAME= ${WORDPRESS_LAST_NAME}
WORDPRESS_BLOG_NAME= ${WORDPRESS_BLOG_NAME}
ALLOW_EMPTY_PASSWORD= ${ALLOW_EMPTY_PASSWORD}
SMTP_HOST= ${SMTP_HOST}
SMTP_PORT= ${SMTP_PORT}
SMTP_USER= ${SMTP_USER}
SMTP_PASSWORD= ${SMTP_PASSWORD}
SMTP_PROTOCOL= ${SMTP_PROTOCOL}

.env :

WORDPRESS_USERNAME=Put_your_name_login_of_user_wordpress_admin
WORDPRESS_PASSWORD=Put_your_password_of_user_wordpress_admin
WORDPRESS_EMAIL=Put_your_email_of_user_wordpress_admin
WORDPRESS_FIRST_NAME=Put_your_First_name_of_user_wordpress_admin
WORDPRESS_LAST_NAME=Put_your_Last_name_of_user_wordpress_admin
WORDPRESS_BLOG_NAME=Put_the_name_of_blog
ALLOW_EMPTY_PASSWORD=no
SMTP_HOST=Put_SMTP_SERVER
SMTP_PORT=Put_SMTP_PORT
SMTP_USER=Put_SMTP_SERVER_USER
SMTP_PASSWORD=Put_SMTP_SERVER_USER_PASSWORD
SMTP_PROTOCOL=Put_SMTP_SERVER_PROTOCOL

This is an idea that I hope will not give too much work :)

Thank

Problems creating a second WordPress install with a shared database

I have successfully set up separate WordPress installs without changing the service names in the docker-compose.yml as referenced by #24, but rather installing in subdomains with different container names for WP and the db and housing the sites in separate directories. This spins up separate db containers. Now I want to be able to share an already running database container, but create a new WP container. How can I accomplish this?

version: '3'
services:
   db:
     container_name: ${CONTAINER_DB_NAME}
     image: mariadb:latest
     restart: unless-stopped
     volumes:
        - ${DB_PATH}:/var/lib/mysql
     environment:
       MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
       MYSQL_DATABASE: ${MYSQL_DATABASE}
       MYSQL_USER: ${MYSQL_USER}
       MYSQL_PASSWORD: ${MYSQL_PASSWORD}
     external_links:
        - sitename-db
...

with .env showing:

...

# Path to store your database
#DB_PATH=/path/to/your/local/database/folder
DB_PATH=../sitename/data

...

outputs

ERROR: for sitename-db  Cannot create container for service db: Conflict. The container name "/sitename-db" is already in use by container "13rjbwdv98wdvb2...". You have to remove (or rename) that container to be able to reuse that name.

After connecting to a shared database, I can edit the WP install itself.

admin area not working

I have installed first the companion and then wordpress

Problems:

  1. The requested URL /wp-admin/install.php was not found on this server.
    I solved by:
sudo chown www-data:www-data ./docker_data/site/wp-content
sudo chown www-data:www-data ./docker_data/site/wordpress-core/wp-content

Now I get the login window, however, after that I see:
The requested URL /wp-admin/ was not found on this server.

Changing the url to /wp-admin/index.php gets me one step further.

  1. I tried to add a new user. Clicking on Add brings me to:
    The requested URL /wp-admin/user-new.php was not found on this server.

The list goes on and on, ...
I am sure it is just one small error, but I cannot see it.
How to solve that?

====
Update:
I found, that most of the 'missing pages' I get, if I just re-load the page.

====
Update:
I deleted the containers and data directories and started over. Same result.

Looking at the containers I have, I wonder if I interpreted the statement:
Starting your web containers
I issued the command:

docker run -d -e VIRTUAL_HOST=example.com \
-e LETSENCRYPT_HOST=example.com \
-e [email protected] \
--network=webproxy \
--name my_app \
httpd:alpine

I wonder what my_app is doing. Just tried to stop the container my_app and now my site is working.
When do I need to issue this command? and what is my_app ?

Cannot install themes

Trying to install some themes from the dashboard and get:

An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.

Any clue what that cause the issue?Thx

Gets only http to work

Following the readme from the webproxy and the wordpress-readme in this repo, I get Wordpress only working on HTTP. Using HTTPS there is no response.

Do you have any idea how to troubleshoot this? I followed the steps several times but it seams to be every time the same (unknown) fault.

I've noticed the following running the start.sh script:

./start.sh: 10: ./start.sh: source: not found
"docker network create" requires exactly 1 argument.
See 'docker network create --help'.

Usage:  docker network create [OPTIONS] NETWORK [flags]

Create a network

within my nginx certs directory the certificate for the TLD was created correctly, so I assume the nginx/letsencrypt setup is correctly. But while running the test scripts, the same error is shown:

./test_start.sh: 13: ./test_start.sh: source: not found

I've already looked up this issue. I'm running ubuntu 16.04 with bin/bash available. But atm docker is set up to required sudo. Should I change this to work without sudo?

Thanks in advance
Andreas

Proxy working but not with added Wordpress?

I have an issue similar to #6

BUT i double checked my .env files and it all is fine (no typo in networks etc).

I happen to have witnessed a strange issue with my ip (see issue). I thought that not mentioning my external ip in the docker-compose.yml file could make it work (and it did when i ran the test)... but the https:// does not seem to work...

Here are my different files :

Wordpress .env

# .env file to set up your wordpress site

#
# Network name
# 
# The network name must be the same name of your webproxy (proxy container)
#
NETWORK=webproxy

#
# Database Container configuration
# We recommend MySQL or MariaDB - please update docker-compose file if needed.
#
CONTAINER_DB_NAME=db_wppro

# Path to store your database
DB_PATH=./data/db_data

# Root password for your database
MYSQL_ROOT_PASSWORD=MYPASS

# Database name, user and password for your wordpress
MYSQL_DATABASE=wppro
MYSQL_USER=wppro
MYSQL_PASSWORD=MYPASS

#
# Wordpress Container configuration
#
CONTAINER_WP_NAME=wppro

# Path to store your wordpress files
WP_CORE=./data/wordpress/core
WP_CONTENT=./data/wordpress/wp-content

# Table prefix
WORDPRESS_TABLE_PREFIX=wppro_

# Your domain (or domains)
DOMAINS=test.example.com,www.test.example.com

# Your email for Let's Encrypt register
[email protected]

Wordpress docker-compose.yml

version: '3'

services:
   db:
     container_name: ${CONTAINER_DB_NAME}
     image: mysql:5.7
     restart: unless-stopped
     volumes:
        - ${DB_PATH}:/var/lib/mysql
     environment:
       MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
       MYSQL_DATABASE: ${MYSQL_DATABASE}
       MYSQL_USER: ${MYSQL_USER}
       MYSQL_PASSWORD: ${MYSQL_PASSWORD}

   wordpress:
     depends_on:
       - db
     container_name: ${CONTAINER_WP_NAME}
     image: wordpress:latest
     restart: unless-stopped
     volumes:
       - ${WP_CORE}:/var/www/html
       - ${WP_CONTENT}:/var/www/html/wp-content
     environment:
       WORDPRESS_DB_HOST: ${CONTAINER_DB_NAME}:3306
       WORDPRESS_DB_NAME: ${MYSQL_DATABASE}
       WORDPRESS_DB_USER: ${MYSQL_USER}
       WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD}
       WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX}
       VIRTUAL_HOST: ${DOMAINS}
       LETSENCRYPT_HOST: ${DOMAINS}
       LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL} 

networks:
    default:
       external:
         name: ${NETWORK}

Proxy .env

#
# docker-compose-letsencrypt-nginx-proxy-companion
# 
# A Web Proxy using docker with NGINX and Let's Encrypt
# Using the great community docker-gen, nginx-proxy and docker-letsencrypt-nginx-proxy-companion
#
# This is the .env file to set up your webproxy enviornment

# Define the names for your local containers
NGINX_WEB=nginx-web
DOCKER_GEN=nginx-gen
LETS_ENCRYPT=nginx-letsencrypt

# Your external IP address
IP=MYIP

# Network name
NETWORK=webproxy

# NGINX file path
NGINX_FILES_PATH=./data

Proxy docker-compose.yml

version: '3'
services:
  nginx-web:
    image: nginx
    labels:
        com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
    container_name: ${NGINX_WEB}
    restart: always
    ports:
#      - "${IP}:80:80"
#      - "${IP}:443:443"
       - "80:80"
       - "443:443"
    volumes:
      - ${NGINX_FILES_PATH}/conf.d:/etc/nginx/conf.d
      - ${NGINX_FILES_PATH}/vhost.d:/etc/nginx/vhost.d
      - ${NGINX_FILES_PATH}/html:/usr/share/nginx/html
      - ${NGINX_FILES_PATH}/certs:/etc/nginx/certs:ro
      - ${NGINX_FILES_PATH}/htpasswd:/etc/nginx/htpasswd:ro

  nginx-gen:
    image: jwilder/docker-gen
    command: -notify-sighup ${NGINX_WEB} -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
    container_name: ${DOCKER_GEN}
    restart: always
    volumes:
      - ${NGINX_FILES_PATH}/conf.d:/etc/nginx/conf.d
      - ${NGINX_FILES_PATH}/vhost.d:/etc/nginx/vhost.d
      - ${NGINX_FILES_PATH}/html:/usr/share/nginx/html
      - ${NGINX_FILES_PATH}/certs:/etc/nginx/certs:ro
      - ${NGINX_FILES_PATH}/htpasswd:/etc/nginx/htpasswd:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro

  nginx-letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: ${LETS_ENCRYPT}
    restart: always
    volumes:
      - ${NGINX_FILES_PATH}/conf.d:/etc/nginx/conf.d
      - ${NGINX_FILES_PATH}/vhost.d:/etc/nginx/vhost.d
      - ${NGINX_FILES_PATH}/html:/usr/share/nginx/html
      - ${NGINX_FILES_PATH}/certs:/etc/nginx/certs:rw
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      NGINX_DOCKER_GEN_CONTAINER: ${DOCKER_GEN}
      NGINX_PROXY_CONTAINER: ${NGINX_WEB}

networks:
  default:
    external:
      name: ${NETWORK}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.