Git Product home page Git Product logo

wordpress-docker-compose's People

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  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

wordpress-docker-compose's Issues

WP-CLI: Error establishing a database connection

Not sure what I'm doing wrong here. I'm following all of the instructions, not changing any default variables, and while WordPress and PHPMyAdmin work perfectly, I can't get wp-cli to work. Any time I run the command in the instructions, I get Error establishing a database connection. Any time I try to restart it via the Docker dashboard, I get the same error. What gives? What database credentials is wp-cli using? What else can I do to configure this?

If it makes a difference, I'm on a new MacBook Pro with the M1 chip. (This has caused problems with other programs; don't know if it's an issue here.)

Server sent charset unknown to the client

I’ve done a docker-compose pull today and now after a docker-compose up I’m getting this:

wordpress_1  | Warning: mysqli::mysqli(): Server sent charset (255) unknown to the client. Please, report to the developers in - on line 22
wordpress_1  | 
wordpress_1  | Warning: mysqli::mysqli(): (HY000/2054): Server sent charset unknown to the client. Please, report to the developers in - on line 22
wordpress_1  | 
wordpress_1  | MySQL Connection Error: (2054) Server sent charset unknown to the client. Please, report to the developers
my_wordpress_1 exited with code 1

Any idea what’s wrong here?

wpcli_1 exited with code 0

Starting clubby-tachira_db_1 ... done
Starting clubby-tachira_pma_1 ... done
Starting clubby-tachira_wp_1 ... done
Starting clubby-tachira_wpcli_1 ... done
Attaching to clubby-tachira_db_1, clubby-tachira_pma_1, clubby-tachira_wp_1, clubby-tachira_wpcli_1
db_1 | 2020-04-09 21:58:11+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
db_1 | 2020-04-09 21:58:11+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_1 | 2020-04-09 21:58:11+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
db_1 | 2020-04-09T21:58:11.572436Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
db_1 | 2020-04-09T21:58:11.572540Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 1
pma_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
pma_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
pma_1 | [Thu Apr 09 21:58:13.173908 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.4.4 configured -- resuming normal operations
pma_1 | [Thu Apr 09 21:58:13.173961 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
wp_1 | [09-Apr-2020 21:58:13 UTC] PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22
wp_1 |
wp_1 | MySQL Connection Error: (2002) Connection refused
db_1 | 2020-04-09T21:58:14.952015Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
db_1 | 2020-04-09T21:58:15.077161Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db_1 | 2020-04-09T21:58:15.554287Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
db_1 | 2020-04-09T21:58:15.710874Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
wp_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message
wp_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message
wp_1 | [Thu Apr 09 21:58:16.889768 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.16 configured -- resuming normal operations
wp_1 | [Thu Apr 09 21:58:16.891339 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
clubby-tachira_wpcli_1 exited with code 0


I don't sure if it is a real problem.
I want to add a second Wordpress to test Underscore theme alongside the "Unit test data" but I only want this Data "unit test data" available for this instance of wordpress. could you please show me how

Wordpress container (e.g. wp_1) does not run in Windows 10 Desktop Docker

This Wordpress-Docker-Compose setup runs brilliantly on MacOSX and Linux for me, but I cannot get it to run on WIndows 10 (Docker Desktop). I have tried running in powershell as user or as administrator, but in each case, the Wordpress Container is not running. I could not find anything in the logs. I can get to phpmyadmin, and the DB is created but not populated.

I'm not sure where to start looking for the problem.

Database dump examples?

I'm not sure how the data base dump import works the Readme doesn't have a clear example. What kind of 'dump file' is needed? how do I get this file from an existing site?

ls: cannot open directory '/docker-entrypoint-initdb.d/': Permission denied

Cloning repo and running compose up doesn't work anymore.

$ docker-compose up
Creating network "wordpress_default" with the default driver
Creating volume "wordpress_db_data" with default driver
Creating wordpress_db_1 ... done
Creating wordpress_pma_1   ... done
Creating wordpress_wp_1  ... done
Creating wordpress_wpcli_1 ... done
Attaching to wordpress_db_1, wordpress_wp_1, wordpress_pma_1, wordpress_wpcli_1
db_1     | 2020-07-08 20:00:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.20-1debian10 started.
db_1     | 2020-07-08 20:00:00+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
wp_1     | chown: changing ownership of '.': Permission denied
db_1     | 2020-07-08 20:00:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.20-1debian10 started.
pma_1    | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.25.0.4. Set the 'ServerName' directive globally to suppress this message
db_1     | ls: cannot open directory '/docker-entrypoint-initdb.d/': Permission denied
wordpress_wp_1 exited with code 1
pma_1    | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.25.0.4. Set the 'ServerName' directive globally to suppress this message
pma_1    | [Wed Jul 08 20:00:01.069317 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.4.6 configured -- resuming normal operations
pma_1    | [Wed Jul 08 20:00:01.069365 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
wordpress_db_1 exited with code 2
wpcli_1  | Error: This does not seem to be a WordPress installation.
wpcli_1  | Pass --path=`path/to/wordpress` or run `wp core download`.
wordpress_wpcli_1 exited with code 1


Can not start server due to "Could not reliably determine the server's fully qualified domain name"

Hello, I used docker-compose up and I got :

db_1     | 
db_1     | MySQL init process done. Ready for start up.
db_1     | 
db_1     | 2019-02-17T21:11:04.675858Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
db_1     | 2019-02-17T21:11:04.675953Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.15) starting as process 1
db_1     | 2019-02-17T21:11:05.345512Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
db_1     | 2019-02-17T21:11:05.352729Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db_1     | 2019-02-17T21:11:05.374996Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.15'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
db_1     | 2019-02-17T21:11:05.440863Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
wp_1     | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.3. Set the 'ServerName' directive globally to suppress this message
wp_1     | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.3. Set the 'ServerName' directive globally to suppress this message
wp_1     | [Sun Feb 17 21:11:05.774069 2019] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.2.15 configured -- resuming normal operations
wp_1     | [Sun Feb 17 21:11:05.774131 2019] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

Same issue on 2 OS based on Ubuntu; latest docker;

Thanks,

docker-compose up error (beginner) macos

Hi,

I stumbled upon the error attached below when running docker-compose up and I
wanted to ask anyone here if anyone else has seen this? This is the first time
I use docker so maybe there is an obvious solution. Please tell me if I should
provide additional info. I am super excited to learn how this works!!

OS macos mojave

╰ docker-compose up
Traceback (most recent call last):
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1253, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1299, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1248, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1008, in _send_output
    self.send(msg)
  File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 948, in send
    self.connect()
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/docker/transport/unixconn.py", line 43, in connect
    sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/urllib3/util/retry.py", line 532, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1253, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1299, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1248, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1008, in _send_output
    self.send(msg)
  File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 948, in send
    self.connect()
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/docker/transport/unixconn.py", line 43, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/docker-compose", line 33, in <module>
    sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/compose/cli/main.py", line 81, in main
    command_func()
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/compose/cli/main.py", line 200, in perform_command
    project = project_from_options('.', options)
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/compose/cli/command.py", line 60, in project_from_options
    return get_project(
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/compose/cli/command.py", line 152, in get_project
    client = get_client(
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/compose/cli/docker_client.py", line 41, in get_client
    client = docker_client(
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/compose/cli/docker_client.py", line 170, in docker_client
    client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs)
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
  File "/usr/local/Cellar/docker-compose/1.29.2/libexec/lib/python3.9/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

Volume mounting issue

This does not work:

  - ./wp-app:/var/www/html # Full wordpress project
  - ./plugin-name/trunk/:/var/www/html/wp-content/plugins/plugin-name # Plugin development
  - ./theme-name/trunk/:/var/www/html/wp-content/themes/theme-name # Theme development

Make site available to the lan?

This is probably a simple issue of docker ignorance on my part.
Is there a way to make the website available to the LAN and not just the localhost?

Unable to upload theme in to wordpress

When I tried to upload a theme into WordPress through admin console, it says The uploaded file exceeds the upload_max_filesize directive in php.ini. and I can't find the php.ini file to edit the file size limit.

Can you please guide me on this issue?
Thank you.

Cannot start as a service

I'm trying to use the docker-compose.yml to start the wordpress as a service.

docker stack deploy -c docker-compose.yml wp1

However, the mysql container is not starting and is failing with this error

time="2019-09-26T12:06:30Z" level=info msg="shim docker-containerd-shim started" address="/containerd-shim/moby/4f6b0c7286856ee9fd726cf1ce957103f62b7f39ee9f321584da250ea3a91acd/shim.sock" debug=false pid=13893
time="2019-09-26T12:06:31Z" level=info msg="shim reaped" id=4f6b0c7286856ee9fd726cf1ce957103f62b7f39ee9f321584da250ea3a91acd
time="2019-09-26T12:06:31.298552013Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
time="2019-09-26T12:06:31.526719243Z" level=error msg="fatal task error" error="task: non-zero exit (1)" module=node/agent/taskmanager node.id=o5eezulizx214m5effwasb1nc service.id=x1i0e0sea1qi4g8jj2hu3vgvl task.id=zo8oi32rt2w12daqu9x1v7c1l

If i do a docker-compose up everything works as expected.
Any idea why ?
Thank you

Loopback and Rest Issues?

There are two issues when checking out the health page from the WordPress dashboard:

The REST API encountered an error
Your site could not complete a loopback request

I think that these are often issues with WordPress in docker. Does anyone know how to fix these?

How to deal with the user permisions on the folders?

The folders that are created after running docker-compose up -d belong to the root user. How to deal with the user permissions?

I want to create a complete development environment thus I need complete access to wp-content for themes and plugins.

Soap client not activated

Hi,

Can you tell us from which Dockerfile you build WPDC please ?
A coupIe of weeks ago I stated using this Docker image and now I need to add the following snippet to the exact same configuration. But i am not sure which one was used.

RUN apt-get update -y \
&& apt-get install -y \
libxml2-dev \
php-soap \
&& apt-get clean -y \
&& docker-php-ext-install soap

Thanks

Wordpress cannot modify database

I followed your guide, and now I'm getting the following issues;

WordPress database error: [View 'information_schema.COLUMNS' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them] SHOW FULL COLUMNS FROM "wp_options"

There are literally dozens of these errors.

How can I resolve this issue?

Changes in "style.css" don't work (Why)

changes in "style.css" located in "wp-app\wp-content\themes\mi-tema" don't sync with the "style.css" loaded in the chrome browser.
all is running ok.
I am using Docker 2.3.0.2 and Windows 10 (with linux containers)
I not have idea what I need to make it happend

Can't import an existing site

I tried to run an existing site into this container following the docs. No success, I just get a blank screen of death. It is creating succesfully the database from the export and I can debug (with die()) several files inside the wp-app folder. Not exactly if this is an issue with this compose file, but do you have any idea why is this happening?

Wordpress Container unable to connect to DB Container

Hi,

For some reason, when I run docker-compose, my Wordpress container is unable to connect to the MySql container.

Visiting the wordpress site yields:

"Error establishing a database connection"

Looking at the Wordpress logs yields:

[20-Apr-2019 21:57:12 UTC] PHP Warning:  mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22

MySQL Connection Error: (2002) Connection refused
[20-Apr-2019 21:57:15 UTC] PHP Warning:  mysqli::__construct(): (HY000/1130): Host '172.18.0.3' is not allowed to connect to this MySQL server in Standard input code on line 22

MySQL Connection Error: (1130) Host '172.18.0.3' is not allowed to connect to this MySQL server

MySQL Connection Error: (1130) Host '172.18.0.3' is not allowed to connect to this MySQL server

MySQL Connection Error: (1130) Host '172.18.0.3' is not allowed to connect to this MySQL server

MySQL Connection Error: (1130) Host '172.18.0.3' is not allowed to connect to this MySQL server

MySQL Connection Error: (1130) Host '172.18.0.3' is not allowed to connect to this MySQL server

MySQL Connection Error: (1130) Host '172.18.0.3' is not allowed to connect to this MySQL server

MySQL Connection Error: (1130) Host '172.18.0.3' is not allowed to connect to this MySQL server

MySQL Connection Error: (1130) Host '172.18.0.3' is not allowed to connect to this MySQL server

MySQL Connection Error: (1130) Host '172.18.0.3' is not allowed to connect to this MySQL server

WARNING: unable to establish a database connection to 'db'
  continuing anyways (which might have unexpected results)

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
[Sat Apr 20 21:57:40.147770 2019] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.2.17 configured -- resuming normal operations
[Sat Apr 20 21:57:40.147871 2019] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

Any advice on how to resolve or debug this issue is greatly appreciated.

FYI, I have tried numerous other approaches. I just keep getting the same results. I wondering if it is because of me not connecting directly to a router?

Would you mind adding port 1025 to Mailhog?

It would be nice if you could expose

- 1025:1025 # smtp server

by default in docker-compose.yml so that users easier see how to access smtp of Mailhog. It took me a while to figure it out. To anyone who has trouble configuring it: the hostname to connect to Mailhog is

host.docker.internal

and not "127.0.0.1" and the default port is 1025.

[Feature Request] Build XDebug into PHP config?

Would it be within the goals of the project to have XDebug be part of the PHP configuration? Or is there intention for this container configuration to be used for production purposes too?

Or has someone done this on their own already and have a few bullet points to share on how to set it up?

IP addresses got messed up

The first time i did docker-compose up i saw the address http://172.18.0.3 in the log so i browsed to there (before i went to 127.0.0.1). Also http://172.18.0.4, one for phpMyAdmin and the other one for the website.

Then i restarted my laptop and did docker compose again. Now the following situation:

  • Website on http://172.18.0.4/ tries to load assets from http://172.18.0.3/
  • http://172.18.0.3/ runs phpMyAdmin
  • http://127.0.0.1/ also tries to load assets from http://172.18.0.3/

How can I use this with a database dump ?

I have a database.sql I made with a wordpress-duplicator, along with all the files with from my wordpress installation.

I guess I put the files in wp-app, but how do I use my database restore with wordpress-docker-compose ?

Cannot Access Site From External Machine - Windows 10 / WSL2

This may be a Windows problem rather than a problem with the Container.

I usually start working on a site using localhost:80. It works well on Linux and Windows. At some point I need to give it an external URL for testing eCommerce apps. I usually do this by implementing SSL as I described in a previous issue, and use a DynDns app to provide an External URL.

It works perfectly if I bring up the container on Linux, but I cannot access the site if I bring it up on Windows (I am using docker desktop with the WSL2 interface). I can still access the site via localhost, but not via the external URL. I have tried opening port 80 and 443 on the Windows Firewall, but other than that I have not been able to figure out why I cannot access the site. I'm hoping that if this is a Windows issue, that one of you who use Windows more frequently will have a clue to the problem, as I use Windows as little as possible.

Thanks - John

How to configure for minimal memory usage?

Thanks for this wonderful project, everything works great out of the box! My question is if anyone has figured out how to configure mysql to use minimal memory, as well as if there is anything which can be configured on the Wordpress side.

I'm running multiple low traffic blogs on a single VPS, thus it would be nice to figure out how to make this work without a large swap file.

Cannot find my plugin with wpcli plugin list

First of, I'd like to say that I love this repo.

I am including my plugin in the volume as recommended and I can see it in the plugins page in wp admin. I can also activate it, no problem. However, nothing shows up under
wp-app/wp-content/plugins/myPlugin
It's just an empty directory.

Why is that? Isn't there supposed to be my plugin files?

Wrong yaml configuration

We need to fix the yaml configuration.


volumes:
  db_data:

should be replaced by

volumes:
  db_data: {}

Changing database port does not work

I changed these lines

PMA_PORT: 3307

and

      - ${IP}:3307:3307 # change ip if required

in docker-compose.yml. Then i run docker-compose up

Then when i run sudo netstat -tulpn | rg 3306 i get

tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      7992/docker-proxy

When CTRL + C in docker compose terminal, and i do netstat again i see that port 3306 is no longer in use.

Cannot find local files

I'm new to Docker. Your bundle is cool. But I cannot find the local WordPress and database files. Where are the volumes locally on my harddisk?

Getting permission denied error when trying to install a wp-cli package

Here's the command with the error at the end:

docker-compose run --rm wpcli package install iandunn/wp-cli-rename-db-prefix
Starting wordpress_db_1_8bc9e55d0b4f ... done
Starting wordpress_wp_1_adeeda83b06e ... done
Error: Composer directory '/etc/X11/fs/.wp-cli/packages' for packages couldn't be created: mkdir(): Permission denied

apache and mysql is not starting

Hi nezhar,

Thanks for sharing this.

I git clone this directory and type in

docker-compose up
The apache service is not starting.

Any ideas.

I am running ubuntu on windows 10 pro wsl

I have tried running other forms docker like visiblevc ,etc, and they start.

geek@DESKTOP-O7A5KCN:/e/PROJECT/DOCKER/MYCHILDCARE$ docker-compose up Starting _db_1 ... Starting _db_1 ... done Starting _wp_1 ... Starting _wp_1 Starting _pma_1 ... Starting _wp_1 ... done Starting _wpcli_1 ... Starting _wpcli_1 ... done Attaching to _db_1, _wp_1, _pma_1, _wpc db_1 | 2019-10-28 12:35:28+00:00 [Note] [Entrypoint]: Entrypoint script for MyS db_1 | 2019-10-28 12:35:33+00:00 [Note] [Entrypoint]: Switching to dedicated us db_1 | 2019-10-28 12:35:33+00:00 [Note] [Entrypoint]: Entrypoint script for MyS db_1 | 2019-10-28T12:35:34.590819Z 0 [Warning] [MY-011070] [Server] 'Disabling k' port: 3306 MySQL Community Server - GPL. db_1 | 2019-10-28T12:35:51.209281Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060 wp_1 | [28-Oct-2019 12:35:52 UTC] PHP Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'172.18.0.3' (using password: YES) in Standard input code on line 22 wp_1 | wp_1 | MySQL Connection Error: (1045) Access denied for user 'root'@'172.18.0.3' (using password: YES) wpcli_1 | Error: Error establishing a database connection. _wpcli_1 exited with code 1 wp_1 | wp_1 | MySQL Connection Error: (1045) Access denied for user 'root'@'172.18.0.3' (using password: YES) wp_1 | wp_1 | MySQL Connection Error: (1045) Access denied for user 'root'@'172.18.0.3' (using password: YES) wp_1 | wp_1 | MySQL Connection Error: (1045) Access denied for user 'root'@'172.18.0.3' (using password: YES) wp_1 | wp_1 | MySQL Connection Error: (1045) Access denied for user 'root'@'172.18.0.3' (using password: YES) wp_1 | wp_1 | MySQL Connection Error: (1045) Access denied for user 'root'@'172.18.0.3' (using password: YES) wp_1 | wp_1 | MySQL Connection Error: (1045) Access denied for user 'root'@'172.18.0.3' (using password: YES) wp_1 | wp_1 | MySQL Connection Error: (1045) Access denied for user 'root'@'172.18.0.3' (using password: YES) wp_1 | wp_1 | MySQL Connection Error: (1045) Access denied for user 'root'@'172.18.0.3' (using password: YES) wp_1 | wp_1 | WARNING: unable to establish a database connection to 'db' wp_1 | continuing anyways (which might have unexpected results) wp_1 | wp_1 | AH00543: apache2: bad user name 1000 mychildcare_wp_1 exited with code 1 ^CGracefully stopping... (press Ctrl+C again to force) Stopping _pma_1 ... done Stopping _db_1 ... done

MySQL Connection Error: (2002) Connection refused

I think the problem here is that apache can't determine its domain name:

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.4. Set the 'ServerName' directive globally to suppress this

This is the code that I'm getting thrown in the terminal:

G:\Projects\Docker projects\wordpress\wordpress-docker-compose>docker-compose up
Creating network "wordpress-docker-compose_default" with the default driver
Creating volume "wordpress-docker-compose_db_data" with default driver
Creating wordpress-docker-compose_db_1 ... done
Creating wordpress-docker-compose_wp_1 ... done
Creating wordpress-docker-compose_pma_1 ... done
Creating wordpress-docker-compose_wpcli_1 ... done
Attaching to wordpress-docker-compose_db_1, wordpress-docker-compose_pma_1, wordpress-docker-compose_wp_1, wordpress-docker-compose_wpcli_1
db_1 | 2020-04-10 20:27:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
db_1 | 2020-04-10 20:27:08+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_1 | 2020-04-10 20:27:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
db_1 | 2020-04-10 20:27:09+00:00 [Note] [Entrypoint]: Initializing database files
db_1 | 2020-04-10T20:27:09.186328Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
wp_1 | [10-Apr-2020 20:27:12 UTC] PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22
wpcli_1 | Error: Error establishing a database connection.
wordpress-docker-compose_wpcli_1 exited with code 1
pma_1 | phpMyAdmin not found in /var/www/html - copying now...
pma_1 | Complete! phpMyAdmin has been successfully copied to /var/www/html
pma_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.3. Set the 'ServerName' directive globally to suppress this message
pma_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.3. Set the 'ServerName' directive globally to suppress this message
pma_1 | [Fri Apr 10 20:27:15.565929 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.4.4 configured -- resuming normal operations
wp_1 |
wp_1 | MySQL Connection Error: (2002) Connection refused
db_1 | 2020-04-10T20:27:09.186491Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.19) initializing of server in progress as process 40
wp_1 |
wp_1 | MySQL Connection Error: (2002) Connection refused
db_1 | 2020-04-10T20:27:16.340599Z 5 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
db_1 | 2020-04-10 20:27:21+00:00 [Note] [Entrypoint]: Database files initialized
wp_1 |
wp_1 | MySQL Connection Error: (2002) Connection refused
db_1 | 2020-04-10 20:27:21+00:00 [Note] [Entrypoint]: Starting temporary server
db_1 | 2020-04-10T20:27:22.287388Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
db_1 | 2020-04-10T20:27:22.288576Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 90
db_1 | 2020-04-10T20:27:23.456291Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
db_1 | 2020-04-10T20:27:23.464007Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db_1 | 2020-04-10T20:27:23.506800Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL.
db_1 | 2020-04-10 20:27:23+00:00 [Note] [Entrypoint]: Temporary server started.
wp_1 |
wp_1 | MySQL Connection Error: (2002) Connection refused
db_1 | 2020-04-10T20:27:23.633893Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock'
db_1 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
wp_1 |
wp_1 | MySQL Connection Error: (2002) Connection refused
wp_1 |
wp_1 | MySQL Connection Error: (2002) Connection refused
db_1 | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
db_1 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
db_1 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
db_1 | 2020-04-10 20:27:33+00:00 [Note] [Entrypoint]: Creating database wordpress
db_1 |
db_1 | 2020-04-10 20:27:33+00:00 [Note] [Entrypoint]: Stopping temporary server
wp_1 |
wp_1 | MySQL Connection Error: (2002) Connection refused
db_1 | 2020-04-10T20:27:33.544319Z 11 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.19).
db_1 | 2020-04-10T20:27:34.702236Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19) MySQL Community Server - GPL.
db_1 | 2020-04-10 20:27:35+00:00 [Note] [Entrypoint]: Temporary server stopped
db_1 |
db_1 | 2020-04-10 20:27:35+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
db_1 |
db_1 | 2020-04-10T20:27:35.934708Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
db_1 | 2020-04-10T20:27:35.934942Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 1
db_1 | 2020-04-10T20:27:36.735152Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
db_1 | 2020-04-10T20:27:36.740689Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db_1 | 2020-04-10T20:27:36.797819Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
wp_1 |
wp_1 | MySQL Connection Error: (2002) Connection refused
wp_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.4. Set the 'ServerName' directive globally to suppress this message
wp_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.4. Set the 'ServerName' directive globally to suppress this message
wp_1 | [Fri Apr 10 20:27:37.451003 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.16 configured -- resuming normal operations

How can I run more than one instance?

I am trying to figure out how to run more than one instance, but have not been able to get it to work.

I set ${IP}:8000:80 for instance 1 and tried ${IP}:8010:80
I increased the other port numbers (db and pma) by one.

If I take one instance down, I can run the other one, but not at the same time. What do I need to configure to run both on different ports?

Can't run docker-compose because of volume specification error

Every time I try to run docker-compose up I get the following error.

E:\agency-development>docker-compose up
agency-development_db_1 is up-to-date
Creating agency-development_wordpress_1 ... error

ERROR: for agency-development_wordpress_1  Cannot create container for service wordpress: invalid volume specification: '/e/agency-development/wp-content:/var/www/html/wp-content:rw'

ERROR: for wordpress  Cannot create container for service wordpress: invalid volume specification: '/e/agency-development/wp-content:/var/www/html/wp-content:rw'
ERROR: Encountered errors while bringing up the project.

I have also added COMPOSE_CONVERT_WINDOWS_PATHS=1 as the env variable

add WP-CLI (code and info provided)

Hi, it would be great to add WP-CLI by default!

I have only just started to use Docker, and hacked this together which seems to work. Does this look good to you? I am a bit worried I may have caused problems, I don't know what I am doing yet. I based it on this:

https://stackoverflow.com/questions/50999848/how-to-run-wp-cli-in-docker-compose-yml

Maybe it would be beneficial to add something like this to the official repo?

docker-compose.yml

  wpcli:
    image: wordpress:cli
    user: xfs
    volumes:
      - ./wp-app:/var/www/html:z
    depends_on:
      - db
      - wordpress
    networks:
      - wordpress-network

Now on the command line you can:

alias wp="sudo docker-compose run --rm wpcli"

and type:

wp plugin list
Starting final_db_1 ... done
Starting final_wordpress_1 ... done
+---------+----------+--------+---------+
| name    | status   | update | version |
+---------+----------+--------+---------+
| akismet | inactive | none   | 4.0.8   |
+---------+----------+--------+---------+

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.