wodby/docker4wordpress

403 forbidden at wp.docker.localhost:8000

David-Else opened this issue · 14 comments

Codebase

Built-in vanilla WordPress

Host OS

Fedora 28

Docker info output

Containers: 6
 Running: 5
 Paused: 0
 Stopped: 1
Images: 6
Server Version: 1.13.1
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: journald
Cgroup Driver: systemd
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
 Authorization: rhel-push-plugin
Swarm: inactive
Runtimes: oci runc
Default Runtime: oci
Init Binary: /usr/libexec/docker/docker-init-current
containerd version: c301b045f9faddcf7693229601303639af6b0885 (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: c301b045f9faddcf7693229601303639af6b0885-dirty (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: N/A (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
 seccomp
  WARNING: You're not using the default seccomp profile
  Profile: /etc/docker/seccomp.json
 selinux
Kernel Version: 4.16.7-300.fc28.x86_64
Operating System: Fedora 28 (Workstation Edition)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 4
Total Memory: 7.664 GiB
Name: localhost.localdomain
ID: 77UA:53DX:SURV:H7EZ:M44C:GPB3:ODZR:QQRS:HFTB:WUJF:HSP4:X34C
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: true
Registries: docker.io (secure), registry.fedoraproject.org (secure), quay.io (secure), registry.access.redhat.com (secure), docker.io (secure)

Docker compose file

unmodified from your github

I follow the instructions in quick start Option 1: Run Vanilla WordPress from Image.

When it did not work I also edited my hosts file to add 127.0.0.1 wp.docker.localhost and tried 127.0.0.1 http://wp.docker.localhost:8000

I can't get past 403 forbidden at wp.docker.localhost:8000.

portainer.wp.docker.localhost works fine and shows all the containers running apart from the my_wordpress_project_php which says stopped. If i start it then nothing changes.

Show containers logs

Hi,

I formatted my hard drive and installed Fedora 28 and started again. Now I can't even get to the stage I was at before. Here is the Docker version: Docker version 1.13.1, build c301b04-unsupported

I copy https://github.com/wodby/docker4wordpress/releases/download/5.0.7/docker4wordpress.tar.gz and extract it into my WP site on my local hard drive. I am following this guide, https://wodby.com/stacks/wordpress/docs/local/quick-start/ ,and this is the first time I am attempting to use docker for anything.

(edit: I realize i need to enter more details as in Option 2, to get my WP instance to run, I am just trying to get anything running first as in the "Option 1: Run Vanilla WordPress from Image" section)

Changing my hosts file did nothing before, so am not doing that yet unless you advise it.

Here is what I get on the command line, thanks in advance for taking a look at this:

$sudo systemctl start docker
$sudo docker-compose up -d
WARNING: The MARIADB_TAG variable is not set. Defaulting to a blank string.
WARNING: The PROJECT_NAME variable is not set. Defaulting to a blank string.
WARNING: The DB_ROOT_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The DB_NAME variable is not set. Defaulting to a blank string.
WARNING: The DB_USER variable is not set. Defaulting to a blank string.
WARNING: The DB_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The PHP_TAG variable is not set. Defaulting to a blank string.
WARNING: The DB_HOST variable is not set. Defaulting to a blank string.
WARNING: The NGINX_TAG variable is not set. Defaulting to a blank string.
WARNING: The PROJECT_BASE_URL variable is not set. Defaulting to a blank string.
Creating network "elsewebdevelopmentv129thdec17_default" with the default driver
Pulling mariadb (wodby/mariadb:latest)...
Trying to pull repository docker.io/wodby/mariadb ... 
sha256:e64b79b1b44ae2c1c0bc4d40b1642f56899da2a307797c6f19be3febe2a494fa: Pulling from docker.io/wodby/mariadb
ff3a5c916c92: Pull complete
3b035b0527bb: Pull complete
1aaa2994ffbe: Pull complete
6d44c8c2f3a4: Pull complete
c71d38413828: Pull complete
59b0e79f1521: Pull complete
c1d2032d1645: Pull complete
5685ec44f31d: Pull complete
Digest: sha256:e64b79b1b44ae2c1c0bc4d40b1642f56899da2a307797c6f19be3febe2a494fa
Status: Downloaded newer image for docker.io/wodby/mariadb:latest
Pulling php (wodby/wordpress-php:latest)...
Trying to pull repository docker.io/wodby/wordpress-php ... 
sha256:6835d4b47746702a0436e55d1e10067c39d5abf1a79404bf11c8dfc0f8fa87f4: Pulling from docker.io/wodby/wordpress-php
ff3a5c916c92: Already exists
3b035b0527bb: Already exists
1aaa2994ffbe: Already exists
43fef01b7493: Pull complete
a64c6e4edc48: Pull complete
59f596b94868: Pull complete
6388ce249485: Pull complete
fee19cfc4433: Pull complete
c9738077ca26: Pull complete
8ccbc285c8ce: Pull complete
414c4194c909: Pull complete
eb78991d2ece: Pull complete
eca60705d45c: Pull complete
b588e6c768a3: Pull complete
a16a12836e94: Pull complete
715dc199905f: Pull complete
7de8138c1fdd: Pull complete
55c53a385524: Pull complete
2de30ce36a31: Pull complete
3239d0db3d31: Pull complete
bd4dd1825f30: Pull complete
Digest: sha256:6835d4b47746702a0436e55d1e10067c39d5abf1a79404bf11c8dfc0f8fa87f4
Status: Downloaded newer image for docker.io/wodby/wordpress-php:latest
Pulling nginx (wodby/wordpress-nginx:latest)...
Trying to pull repository docker.io/wodby/wordpress-nginx ... 
sha256:10015dbcfaf8de5eb5efabefd5916673659bee759277991366dd5f05d7da7124: Pulling from docker.io/wodby/wordpress-nginx
ff3a5c916c92: Already exists
3b035b0527bb: Already exists
1aaa2994ffbe: Already exists
e5727446e9cf: Pull complete
38382d244e95: Pull complete
0f3e0173f06f: Pull complete
8632d063be10: Pull complete
f3d4d810c7c5: Pull complete
ab5cc8cd3a34: Pull complete
5f7aeac2eecf: Pull complete
Digest: sha256:10015dbcfaf8de5eb5efabefd5916673659bee759277991366dd5f05d7da7124
Status: Downloaded newer image for docker.io/wodby/wordpress-nginx:latest
Pulling mailhog (mailhog/mailhog:latest)...
Trying to pull repository docker.io/mailhog/mailhog ... 
sha256:5be1ae7cf894b58fffbe48f84a0541a3595e53124d460d3fb71b3450a8d11189: Pulling from docker.io/mailhog/mailhog
709515475419: Pull complete
6f91489e9e5b: Pull complete
6500075800d5: Pull complete
c3d9e42bac5e: Pull complete
Digest: sha256:5be1ae7cf894b58fffbe48f84a0541a3595e53124d460d3fb71b3450a8d11189
Status: Downloaded newer image for docker.io/mailhog/mailhog:latest
Pulling portainer (portainer/portainer:latest)...
Trying to pull repository docker.io/portainer/portainer ... 
sha256:bfa28307cc6ea050d68d65c47a38a6d68fb95f498d16d6e5b7abc1321c021a09: Pulling from docker.io/portainer/portainer
d1e017099d17: Pull complete
7184b7261933: Pull complete
Digest: sha256:bfa28307cc6ea050d68d65c47a38a6d68fb95f498d16d6e5b7abc1321c021a09
Status: Downloaded newer image for docker.io/portainer/portainer:latest
Pulling traefik (traefik:latest)...
Trying to pull repository docker.io/library/traefik ... 
sha256:2a9da62973c54cf6f68bfb7ddc8f936db5c831451fab6bf158a6202d9e2d5252: Pulling from docker.io/library/traefik
5d3835484afe: Pull complete
1c3defc93798: Pull complete
Digest: sha256:2a9da62973c54cf6f68bfb7ddc8f936db5c831451fab6bf158a6202d9e2d5252
Status: Downloaded newer image for docker.io/traefik:latest
Creating _traefik ... 
Creating _mariadb ... 
Creating _portainer ... 
Creating _php       ... 
Creating _mailhog   ... 
Pulling php (wodby/wordpress-php:latest)...
Creating _portainer ... error
Trying to pull repository docker.io/wodby/wordpress-php ... 
Creating _traefik   ... error

Creating _mailhog   ... error

ERROR: for _mailhog  Cannot create container for service mailhog: b'Invalid container name (_mailhog), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed'

ERROR: for _traefik  Cannot create container for service traefik: b'Invalid container name (_traefik), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed'
sha256:e64b79b1b44ae2c1c0bc4d40b1642f56899da2a307797c6f19be3febe2a494fa: Pulling from docker.io/wodby/mariadb
Digest: sha256:e64b79b1b44ae2c1c0bc4d40b1642f56899da2a307797c6f19be3febe2a494fa
Status: Image is up to date for docker.io/wodby/mariadb:latest

ERROR: for _mariadb  Image 'wodby/mariadb:' not found
sha256:6835d4b47746702a0436e55d1e10067c39d5abf1a79404bf11c8dfc0f8fa87f4: Pulling from docker.io/wodby/wordpress-php
Digest: sha256:6835d4b47746702a0436e55d1e10067c39d5abf1a79404bf11c8dfc0f8fa87f4
Status: Image is up to date for docker.io/wodby/wordpress-php:latest

ERROR: for _php  Image 'wodby/wordpress-php:' not found

ERROR: for portainer  Cannot create container for service portainer: b'Invalid container name (_portainer), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed'

ERROR: for mailhog  Cannot create container for service mailhog: b'Invalid container name (_mailhog), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed'

ERROR: for traefik  Cannot create container for service traefik: b'Invalid container name (_traefik), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed'

ERROR: for mariadb  Image 'wodby/mariadb:' not found

ERROR: for php  Image 'wodby/wordpress-php:' not found
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/docker/api/client.py", line 225, in _raise_for_status
    response.raise_for_status()
  File "/usr/lib/python3.6/site-packages/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.22/images/wodby/wordpress-php:/json

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/compose/service.py", line 335, in image
    return self.client.inspect_image(self.image_name)
  File "/usr/lib/python3.6/site-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/docker/api/image.py", line 245, in inspect_image
    self._get(self._url("/images/{0}/json", image)), True
  File "/usr/lib/python3.6/site-packages/docker/api/client.py", line 231, in _result
    self._raise_for_status(response)
  File "/usr/lib/python3.6/site-packages/docker/api/client.py", line 227, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/usr/lib/python3.6/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.ImageNotFound: 404 Client Error: Not Found ("b'No such image: wodby/wordpress-php:'")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 11, in <module>
    load_entry_point('docker-compose==1.20.1', 'console_scripts', 'docker-compose')()
  File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 71, in main
    command()
  File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 127, in perform_command
    handler(command, command_options)
  File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 1039, in up
    to_attach = up(False)
  File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 1035, in up
    silent=options.get('--quiet-pull'),
  File "/usr/lib/python3.6/site-packages/compose/project.py", line 495, in up
    get_deps,
  File "/usr/lib/python3.6/site-packages/compose/parallel.py", line 105, in parallel_execute
    raise error_to_reraise
  File "/usr/lib/python3.6/site-packages/compose/parallel.py", line 203, in producer
    result = func(obj)
  File "/usr/lib/python3.6/site-packages/compose/project.py", line 481, in do
    renew_anonymous_volumes=renew_anonymous_volumes,
  File "/usr/lib/python3.6/site-packages/compose/service.py", line 483, in execute_convergence_plan
    scale, detached, start, project_services
  File "/usr/lib/python3.6/site-packages/compose/service.py", line 405, in _execute_convergence_create
    "Creating"
  File "/usr/lib/python3.6/site-packages/compose/parallel.py", line 105, in parallel_execute
    raise error_to_reraise
  File "/usr/lib/python3.6/site-packages/compose/parallel.py", line 203, in producer
    result = func(obj)
  File "/usr/lib/python3.6/site-packages/compose/service.py", line 403, in <lambda>
    lambda service_name: create_and_start(self, service_name.number),
  File "/usr/lib/python3.6/site-packages/compose/service.py", line 394, in create_and_start
    container = service.create_container(number=n, quiet=True)
  File "/usr/lib/python3.6/site-packages/compose/service.py", line 297, in create_container
    previous_container=previous_container,
  File "/usr/lib/python3.6/site-packages/compose/service.py", line 815, in _get_container_create_options
    self.config_hash if add_config_hash else None)
  File "/usr/lib/python3.6/site-packages/compose/service.py", line 618, in config_hash
    return json_hash(self.config_dict())
  File "/usr/lib/python3.6/site-packages/compose/service.py", line 623, in config_dict
    'image_id': self.image()['Id'],
  File "/usr/lib/python3.6/site-packages/compose/service.py", line 337, in image
    raise NoSuchImageError("Image '{}' not found".format(self.image_name))
compose.service.NoSuchImageError: Image 'wodby/wordpress-php:' not found

It seems you're missing .env file from archive

Thanks! The problem was in the file explorer it does not show hidden files (with a . in front) by default so when I copied them over the .env file was missing.

Now I am back to the original problem. Here is the info you requested, cheers!:

$ sudo docker info
Containers: 6
 Running: 5
 Paused: 0
 Stopped: 1
Images: 9
Server Version: 1.13.1
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: journald
Cgroup Driver: systemd
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
 Authorization: rhel-push-plugin
Swarm: inactive
Runtimes: oci runc
Default Runtime: oci
Init Binary: /usr/libexec/docker/docker-init-current
containerd version: c301b045f9faddcf7693229601303639af6b0885 (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: c301b045f9faddcf7693229601303639af6b0885-dirty (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: N/A (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
 seccomp
  WARNING: You're not using the default seccomp profile
  Profile: /etc/docker/seccomp.json
 selinux
Kernel Version: 4.16.8-300.fc28.x86_64
Operating System: Fedora 28 (Workstation Edition)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 8
Total Memory: 7.663 GiB
Name: Gigabot
ID: T2EX:PGPS:KGGC:UOIJ:AIWP:7H5G:MN5Z:E7HF:IEPJ:54V3:UVGK:65U3
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: true
Registries: docker.io (secure), registry.fedoraproject.org (secure), quay.io (secure), registry.access.redhat.com (secure), docker.io (secure)

$ sudo docker-compose logs
Attaching to my_wordpress_project_nginx, my_wordpress_project_php, my_wordpress_project_traefik, my_wordpress_project_mailhog, my_wordpress_project_mariadb, my_wordpress_project_portainer
my_wordpress_project_php | chown: /var/www/html: Permission denied
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: using the "epoll" event method
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: nginx/1.13.12
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: built by gcc 6.4.0 (Alpine 6.4.0) 
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: OS: Linux 4.16.8-300.fc28.x86_64
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: start worker processes
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: start worker process 35
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: start worker process 36
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: start worker process 37
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: start worker process 38
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: start worker process 39
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: start worker process 40
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: start worker process 41
my_wordpress_project_nginx | 2018/05/18 09:12:02 [notice] 1#1: start worker process 42
my_wordpress_project_nginx | 2018/05/18 09:12:13 [notice] 35#35: *1 "/wp-admin$" does not match "/", client: 172.18.0.4, server: wordpress, request: "GET / HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 09:12:13 [error] 35#35: *1 "/var/www/html/index.php" is forbidden (13: Permission denied), client: 172.18.0.4, server: wordpress, request: "GET / HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 172.18.0.4 - - [18/May/2018:09:12:13 +0000] "GET / HTTP/1.1" 403 135 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
my_wordpress_project_nginx | 2018/05/18 09:12:13 [notice] 35#35: *1 "/wp-admin$" does not match "/favicon.ico", client: 172.18.0.4, server: wordpress, request: "GET /favicon.ico HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 09:12:13 [notice] 35#35: *1 "^/[_0-9a-zA-Z-]+(/wp-.*)" does not match "/favicon.ico", client: 172.18.0.4, server: wordpress, request: "GET /favicon.ico HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 09:12:13 [notice] 35#35: *1 "^/[_0-9a-zA-Z-]+(/.*\.php)$" does not match "/favicon.ico", client: 172.18.0.4, server: wordpress, request: "GET /favicon.ico HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 09:12:13 [notice] 35#35: *1 "/wp-admin$" does not match "/favicon.ico", client: 172.18.0.4, server: wordpress, request: "GET /favicon.ico HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 09:12:13 [notice] 35#35: *1 "/wp-admin$" does not match "/favicon.ico", client: 172.18.0.4, server: wordpress, request: "GET /favicon.ico HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 09:12:13 [notice] 35#35: *1 "^/[_0-9a-zA-Z-]+(/wp-.*)" does not match "/favicon.ico", client: 172.18.0.4, server: wordpress, request: "GET /favicon.ico HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 09:12:13 [notice] 35#35: *1 "^/[_0-9a-zA-Z-]+(/.*\.php)$" does not match "/favicon.ico", client: 172.18.0.4, server: wordpress, request: "GET /favicon.ico HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 09:12:13 [notice] 35#35: *1 "/wp-admin$" does not match "/favicon.ico", client: 172.18.0.4, server: wordpress, request: "GET /favicon.ico HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_traefik | time="2018-05-18T09:12:01Z" level=info msg="Using TOML configuration file /dev/null"
my_wordpress_project_traefik | time="2018-05-18T09:12:01Z" level=warning msg="web provider configuration is deprecated, you should use these options : api, rest provider, ping and metrics"
my_wordpress_project_traefik | time="2018-05-18T09:12:01Z" level=info msg="Traefik version v1.6.1 built on 2018-05-14_07:16:56PM"
my_wordpress_project_traefik | time="2018-05-18T09:12:01Z" level=info msg="\nStats collection is disabled.\nHelp us improve Traefik by turning this feature on :)\nMore details on: https://docs.traefik.io/basics/#collected-data\n"
my_wordpress_project_traefik | time="2018-05-18T09:12:01Z" level=info msg="Preparing server http &{Address::80 TLS:<nil> Redirect:<nil> Auth:<nil> WhitelistSourceRange:[] WhiteList:<nil> Compress:false ProxyProtocol:<nil> ForwardedHeaders:0xc4205b33e0} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s"
my_wordpress_project_traefik | time="2018-05-18T09:12:01Z" level=info msg="Preparing server traefik &{Address::8080 TLS:<nil> Redirect:<nil> Auth:<nil> WhitelistSourceRange:[] WhiteList:<nil> Compress:false ProxyProtocol:<nil> ForwardedHeaders:0xc4205b3400} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s"
my_wordpress_project_traefik | time="2018-05-18T09:12:01Z" level=info msg="Starting server on :80"
my_wordpress_project_traefik | time="2018-05-18T09:12:01Z" level=info msg="Starting server on :8080"
my_wordpress_project_traefik | time="2018-05-18T09:12:01Z" level=info msg="Starting provider *docker.Provider {\"Watch\":true,\"Filename\":\"\",\"Constraints\":null,\"Trace\":false,\"TemplateVersion\":2,\"DebugLogGeneratedTemplate\":false,\"Endpoint\":\"unix:///var/run/docker.sock\",\"Domain\":\"\",\"TLS\":null,\"ExposedByDefault\":true,\"UseBindPortIP\":false,\"SwarmMode\":false}"
my_wordpress_project_traefik | time="2018-05-18T09:12:02Z" level=info msg="Server configuration reloaded on :80"
my_wordpress_project_traefik | time="2018-05-18T09:12:02Z" level=info msg="Server configuration reloaded on :8080"
my_wordpress_project_mariadb | Initializing database
my_wordpress_project_mariadb | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
my_wordpress_project_mariadb | To do so, start the server, then issue the following commands:
my_wordpress_project_mariadb | '/usr/bin/mysqladmin' -u root password 'new-password'
my_wordpress_project_mariadb | '/usr/bin/mysqladmin' -u root -h  password 'new-password'
my_wordpress_project_mariadb | Alternatively you can run:
my_wordpress_project_mariadb | '/usr/bin/mysql_secure_installation'
my_wordpress_project_mariadb | which will also give you the option of removing the test
my_wordpress_project_mariadb | databases and anonymous user created by default.  This is
my_wordpress_project_mailhog | 2018/05/18 09:12:00 Using in-memory storage
my_wordpress_project_mailhog | 2018/05/18 09:12:00 [SMTP] Binding to address: 0.0.0.0:1025
my_wordpress_project_mailhog | [HTTP] Binding to address: 0.0.0.0:8025
my_wordpress_project_mailhog | 2018/05/18 09:12:00 Serving under http://0.0.0.0:8025/
my_wordpress_project_mailhog | Creating API v1 with WebPath: 
my_wordpress_project_mailhog | Creating API v2 with WebPath: 
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mariadb | strongly recommended for production servers.
my_wordpress_project_mariadb | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
my_wordpress_project_mariadb | MySQL manual for more instructions.
my_wordpress_project_mariadb | Please report any problems at http://mariadb.org/jira
my_wordpress_project_mariadb | The latest information about MariaDB is available at http://mariadb.org/.
my_wordpress_project_mariadb | You can find additional information about the MySQL part at:
my_wordpress_project_mariadb | http://dev.mysql.com
my_wordpress_project_mariadb | Consider joining MariaDB's strong and vibrant community:
my_wordpress_project_mariadb | https://mariadb.org/get-involved/
my_wordpress_project_mariadb | Database initialized
my_wordpress_project_mariadb | MySQL init process in progress...
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] mysqld (mysqld 10.2.14-MariaDB) starting as process 104 ...
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: Uses event mutexes
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: Compressed tables use zlib 1.2.11
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: Using Linux native AIO
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: Number of pools: 1
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: Using SSE2 crc32 instructions
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = 4, chunk size = 128M
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: Completed initialization of buffer pool
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140650827873000 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: Highest supported file format is Barracuda.
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: 128 out of 128 rollback segments are active.
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: Creating shared tablespace for temporary tables
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: Waiting for purge to start
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] InnoDB: 5.7.21 started; log sequence number 1619994
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140650856872680 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140650856872680 [Note] InnoDB: Buffer pool(s) load completed at 180518  9:12:03
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] Plugin 'FEEDBACK' is disabled.
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Warning] 'user' entry 'root@eb895ada95b2' ignored in --skip-name-resolve mode.
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Warning] 'user' entry '@eb895ada95b2' ignored in --skip-name-resolve mode.
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Warning] 'proxies_priv' entry '@% root@eb895ada95b2' ignored in --skip-name-resolve mode.
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] Reading of all Master_info entries succeded
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] Added new Master_info '' to hash table
my_wordpress_project_mariadb | 2018-05-18  9:12:03 140652302732168 [Note] mysqld: ready for connections.
my_wordpress_project_mariadb | Version: '10.2.14-MariaDB'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MariaDB Server
my_wordpress_project_mariadb | 2018-05-18  9:12:04 140650847652584 [Warning] 'proxies_priv' entry '@% root@eb895ada95b2' ignored in --skip-name-resolve mode.
my_wordpress_project_mariadb | 2018-05-18  9:12:04 140650847652584 [Warning] 'proxies_priv' entry '@% root@eb895ada95b2' ignored in --skip-name-resolve mode.
my_wordpress_project_mariadb | 2018-05-18  9:12:04 140650847333096 [Note] mysqld (initiated by: unknown): Normal shutdown
my_wordpress_project_mariadb | 2018-05-18  9:12:04 140650847333096 [Note] Event Scheduler: Purging the queue. 0 events
my_wordpress_project_mariadb | 2018-05-18  9:12:04 140650857343720 [Note] InnoDB: FTS optimize thread exiting.
my_wordpress_project_mariadb | 2018-05-18  9:12:04 140650847333096 [Note] InnoDB: Starting shutdown...
my_wordpress_project_mariadb | 2018-05-18  9:12:04 140650856872680 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
my_wordpress_project_mariadb | 2018-05-18  9:12:04 140650856872680 [Note] InnoDB: Buffer pool(s) dump completed at 180518  9:12:04
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140650847333096 [Note] InnoDB: Shutdown completed; log sequence number 1620013
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140650847333096 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140650847333096 [Note] mysqld: Shutdown complete
my_wordpress_project_mariadb | MySQL init process done. Ready for start up.
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] mysqld (mysqld 10.2.14-MariaDB) starting as process 1 ...
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: Uses event mutexes
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: Compressed tables use zlib 1.2.11
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: Using Linux native AIO
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: Number of pools: 1
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: Using SSE2 crc32 instructions
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = 4, chunk size = 128M
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: Completed initialization of buffer pool
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140617682033384 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: Highest supported file format is Barracuda.
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: 128 out of 128 rollback segments are active.
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: Creating shared tablespace for temporary tables
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] InnoDB: 5.7.21 started; log sequence number 1620013
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140617711033064 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140617711033064 [Note] InnoDB: Buffer pool(s) load completed at 180518  9:12:06
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] Plugin 'FEEDBACK' is disabled.
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] Server socket created on IP: '0.0.0.0'.
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Warning] 'proxies_priv' entry '@% root@eb895ada95b2' ignored in --skip-name-resolve mode.
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] Reading of all Master_info entries succeded
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] Added new Master_info '' to hash table
my_wordpress_project_mariadb | 2018-05-18  9:12:06 140619156892552 [Note] mysqld: ready for connections.
my_wordpress_project_mariadb | Version: '10.2.14-MariaDB'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MariaDB Server
my_wordpress_project_portainer | 2018/05/18 09:11:59 Starting Portainer 1.17.0 on :9000
my_wordpress_project_php | chown: /var/www/html: Permission denied
my_wordpress_project_nginx | 2018/05/18 09:12:13 [notice] 35#35: *1 "/wp-admin$" does not match "/", client: 172.18.0.4, server: wordpress, request: "GET / HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 09:12:13 [error] 35#35: *1 "/var/www/html/index.php" is forbidden (13: Permission denied), client: 172.18.0.4, server: wordpress, request: "GET / HTTP/1.1", host: "wp.docker.localhost:8000"

It looks like a permissions issue. But it shouldn't happen for vanilla WP because it does not use bind mounts from the host. Make sure you have docker-compose.override.yml file in place.

Fedora is very tight on security, maybe SELinux is at work here. I will investigate and return to this thread. Cheers.

I have solved the SELinux problem. You need to add a :z after the volume:

https://stackoverflow.com/questions/24288616/permission-denied-on-accessing-host-directory-in-docker

This is needed for all versions of RHEL, CentOS, and Fedora. It would be great to add that to your FAQ or automate it somehow.

docker.compose.yml

    /var/lib/mysql:z

    volumes:
      - ./:/var/www/html:z

I have skipped the option one of your FAQ and am now attempting option 2. I have set my .env file like this:
(xxx is a real value of course)


DB_NAME='xxx'
DB_USER='x'
DB_PASSWORD='x'
DB_ROOT_PASSWORD=password
DB_HOST=mariadb

I now have Error establishing a database connection

I see some errors in the log, do I need to change my hosts file? Sorry, I gave up trying to configure my own Apache/MariaDB/PHP as it was too complex, I am not a back-end person, but I need a dev environment for Javascript! CHEERS!

$ sudo docker-compose logs
Attaching to my_wordpress_project_mariadb, my_wordpress_project_nginx, my_wordpress_project_php, my_wordpress_project_mailhog, my_wordpress_project_traefik, my_wordpress_project_portainer
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] mysqld (mysqld 10.2.14-MariaDB) starting as process 1 ...
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: Uses event mutexes
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: Compressed tables use zlib 1.2.11
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: Using Linux native AIO
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: Number of pools: 1
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: Using SSE2 crc32 instructions
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = 4, chunk size = 128M
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: Completed initialization of buffer pool
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140260825692904 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: Highest supported file format is Barracuda.
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: 128 out of 128 rollback segments are active.
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: Creating shared tablespace for temporary tables
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] InnoDB: 5.7.21 started; log sequence number 1620041
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140260854692584 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140260854692584 [Note] InnoDB: Buffer pool(s) load completed at 180518 14:56:17
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] Plugin 'FEEDBACK' is disabled.
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] Server socket created on IP: '0.0.0.0'.
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Warning] 'proxies_priv' entry '@% root@d219cf380d4d' ignored in --skip-name-resolve mode.
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] Reading of all Master_info entries succeded
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] Added new Master_info '' to hash table
my_wordpress_project_mariadb | 2018-05-18 14:56:17 140262300552072 [Note] mysqld: ready for connections.
my_wordpress_project_mariadb | Version: '10.2.14-MariaDB'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MariaDB Server
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: using the "epoll" event method
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: nginx/1.13.12
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: built by gcc 6.4.0 (Alpine 6.4.0) 
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: OS: Linux 4.16.8-300.fc28.x86_64
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: start worker processes
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: start worker process 37
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: start worker process 38
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: start worker process 39
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: start worker process 40
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: start worker process 41
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: start worker process 42
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: start worker process 43
my_wordpress_project_nginx | 2018/05/18 14:46:16 [notice] 1#1: start worker process 44
my_wordpress_project_nginx | 2018/05/18 14:46:24 [notice] 37#37: *1 "/wp-admin$" does not match "/", client: 172.18.0.4, server: wordpress, request: "GET / HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 14:46:24 [notice] 37#37: *1 "/wp-admin$" does not match "/index.php", client: 172.18.0.4, server: wordpress, request: "GET / HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 172.18.0.4 - - [18/May/2018:14:46:24 +0000] "GET / HTTP/1.1" 500 262 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
my_wordpress_project_nginx | 2018/05/18 14:56:29 [notice] 37#37: *3 "/wp-admin$" does not match "/", client: 172.18.0.4, server: wordpress, request: "GET / HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 14:56:29 [notice] 37#37: *3 "/wp-admin$" does not match "/index.php", client: 172.18.0.4, server: wordpress, request: "GET / HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 172.18.0.4 - - [18/May/2018:14:56:29 +0000] "GET / HTTP/1.1" 500 262 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
my_wordpress_project_nginx | 2018/05/18 14:56:30 [notice] 37#37: *3 "/wp-admin$" does not match "/", client: 172.18.0.4, server: wordpress, request: "GET / HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 14:56:30 [notice] 37#37: *3 "/wp-admin$" does not match "/index.php", client: 172.18.0.4, server: wordpress, request: "GET / HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 172.18.0.4 - - [18/May/2018:14:56:30 +0000] "GET / HTTP/1.1" 500 262 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
my_wordpress_project_nginx | 2018/05/18 14:56:30 [notice] 37#37: *3 "/wp-admin$" does not match "/", client: 172.18.0.4, server: wordpress, request: "GET / HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 2018/05/18 14:56:30 [notice] 37#37: *3 "/wp-admin$" does not match "/index.php", client: 172.18.0.4, server: wordpress, request: "GET / HTTP/1.1", host: "wp.docker.localhost:8000"
my_wordpress_project_nginx | 172.18.0.4 - - [18/May/2018:14:56:30 +0000] "GET / HTTP/1.1" 500 262 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
my_wordpress_project_traefik | time="2018-05-18T14:45:37Z" level=info msg="Using TOML configuration file /dev/null"
my_wordpress_project_traefik | time="2018-05-18T14:45:37Z" level=warning msg="web provider configuration is deprecated, you should use these options : api, rest provider, ping and metrics"
my_wordpress_project_traefik | time="2018-05-18T14:45:37Z" level=info msg="Traefik version v1.6.1 built on 2018-05-14_07:16:56PM"
my_wordpress_project_traefik | time="2018-05-18T14:45:37Z" level=info msg="\nStats collection is disabled.\nHelp us improve Traefik by turning this feature on :)\nMore details on: https://docs.traefik.io/basics/#collected-data\n"
my_wordpress_project_traefik | time="2018-05-18T14:45:37Z" level=info msg="Preparing server http &{Address::80 TLS:<nil> Redirect:<nil> Auth:<nil> WhitelistSourceRange:[] WhiteList:<nil> Compress:false ProxyProtocol:<nil> ForwardedHeaders:0xc4203e7180} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s"
my_wordpress_project_traefik | time="2018-05-18T14:45:37Z" level=info msg="Preparing server traefik &{Address::8080 TLS:<nil> Redirect:<nil> Auth:<nil> WhitelistSourceRange:[] WhiteList:<nil> Compress:false ProxyProtocol:<nil> ForwardedHeaders:0xc4203e71a0} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s"
my_wordpress_project_traefik | time="2018-05-18T14:45:37Z" level=info msg="Starting server on :80"
my_wordpress_project_traefik | time="2018-05-18T14:45:37Z" level=info msg="Starting provider *docker.Provider {\"Watch\":true,\"Filename\":\"\",\"Constraints\":null,\"Trace\":false,\"TemplateVersion\":2,\"DebugLogGeneratedTemplate\":false,\"Endpoint\":\"unix:///var/run/docker.sock\",\"Domain\":\"\",\"TLS\":null,\"ExposedByDefault\":true,\"UseBindPortIP\":false,\"SwarmMode\":false}"
my_wordpress_project_traefik | time="2018-05-18T14:45:37Z" level=info msg="Starting server on :8080"
my_wordpress_project_traefik | time="2018-05-18T14:45:37Z" level=info msg="Server configuration reloaded on :80"
my_wordpress_project_traefik | time="2018-05-18T14:45:37Z" level=info msg="Server configuration reloaded on :8080"
my_wordpress_project_traefik | time="2018-05-18T14:45:39Z" level=info msg="Server configuration reloaded on :80"
my_wordpress_project_traefik | time="2018-05-18T14:45:39Z" level=info msg="Server configuration reloaded on :8080"
my_wordpress_project_traefik | time="2018-05-18T14:46:15Z" level=info msg="Server configuration reloaded on :80"
my_wordpress_project_traefik | time="2018-05-18T14:46:15Z" level=info msg="Server configuration reloaded on :8080"
my_wordpress_project_traefik | time="2018-05-18T14:46:15Z" level=info msg="Skipping same configuration for provider docker"
my_wordpress_project_traefik | time="2018-05-18T14:46:15Z" level=info msg="Skipping same configuration for provider docker"
my_wordpress_project_traefik | time="2018-05-18T14:46:17Z" level=info msg="Server configuration reloaded on :80"
my_wordpress_project_traefik | time="2018-05-18T14:46:17Z" level=info msg="Server configuration reloaded on :8080"
my_wordpress_project_traefik | time="2018-05-18T14:56:16Z" level=info msg="Server configuration reloaded on :8080"
my_wordpress_project_traefik | time="2018-05-18T14:56:16Z" level=info msg="Server configuration reloaded on :80"
my_wordpress_project_portainer | 2018/05/18 14:45:37 Starting Portainer 1.17.0 on :9000
my_wordpress_project_php | [18-May-2018 14:46:15] NOTICE: fpm is running, pid 1
my_wordpress_project_php | [18-May-2018 14:46:15] NOTICE: ready to handle connections
my_wordpress_project_php | 172.18.0.2 -  18/May/2018:14:46:24 +0000 "GET /index.php" 500
my_wordpress_project_php | 172.18.0.2 -  18/May/2018:14:56:29 +0000 "GET /index.php" 500
my_wordpress_project_php | 172.18.0.2 -  18/May/2018:14:56:30 +0000 "GET /index.php" 500
my_wordpress_project_php | 172.18.0.2 -  18/May/2018:14:56:30 +0000 "GET /index.php" 500
my_wordpress_project_mailhog | 2018/05/18 14:45:37 Using in-memory storage
my_wordpress_project_mailhog | 2018/05/18 14:45:37 [SMTP] Binding to address: 0.0.0.0:1025
my_wordpress_project_mailhog | [HTTP] Binding to address: 0.0.0.0:8025
my_wordpress_project_mailhog | 2018/05/18 14:45:37 Serving under http://0.0.0.0:8025/
my_wordpress_project_mailhog | Creating API v1 with WebPath: 
my_wordpress_project_mailhog | Creating API v2 with WebPath: 
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_wordpress_project_mailhog | [APIv1] KEEPALIVE /api/v1/events

If you mount your own codebase, you might need to manually create/edit your wp-config.php or specify db credentials during the setup.

Hi, I am back to this problem again after a break.

You say:

you might need to manually create/edit your wp-config.php

the entire WP directory is taken from my working hosted Wordpress install from the web. All the details of wp-config.php are present and correct. It is created, what might I need to edit?

or specify db credentials during the setup.

please see my previous post, it shows exactly what is in my .env file. What exact set-up are you referring to?

I can look at http://portainer.wp.docker.localhost:8000/#/images and it shows everything is running but the following are marked as unused:

docker.io/wodby/mariadb:latest
docker.io/wodby/wordpress-nginx:latest
docker.io/wodby/wordpress-php:latest

Cheers!

Can you connect to mariadb via mysql cli from php container?

Thanks for helping, but I think there is a slight misunderstanding. I am coming from front end development and looking for a way to use docker to replace the LAMP environment I created as it became too complex to maintain. I know docker has it's own complexities, but I was hoping that I could use docker4wordpress out of the box as the instructions to follow seemed really easy.

I understand if this product is just too advanced for me at this point and I am wasting your time, then I will stop posting, but if you think there is hope that I can work this out with your help then you will need to speak in a more basic language for my ignorant brain :)

Can you connect to mariadb via mysql cli from php container?

I am afraid I don't know how I would do this, is there a command I can type on my CLI and paste the result here? I have NOT used docker before.

Thanks again, I understand if this is just beyond the scope of support here and thank you for the time you have already spent on this thread.

Error establishing a database connection

If that's your error this means you either have wrong credentials in your wp-config.php or your php container just has no access to mariadb container for some reason. To check which one I suggested to connect to mariadb directly from php via CLI command. If you have Makefile that comes with this project you can run:

$ make shell
# you're in php container now
# trying to connect to mariadb with the default credentials specified in .env file
$ mysql -uwordpress -pwordpress -hmariadb wordpress

if that works this mean you have something wrong in wp-config.php, if not then you have some kind of docker network issue on your host OS.

me too same issue .. This above step works for me. Provides this output

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.2.14-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [wordpress]>

I've just launched vanilla WP on my machine and got the same error for a few seconds until I refreshed the page. This might happen because MariaDB hasn't yet fully initialized. You might need to wait a few seconds.