Jump to content

Processwire slow with Docker?


SqANT
 Share

Recommended Posts

Hello everybody

I've started to play with Processwire lately and now setup a local installation with Docker. However, it runs quite slow inside the container. Have no problem with phpmyadmin on the same installation and WordPress was fine as well (other installation).

Havn't found much info about Processwire + Docker. Do you guys use Docker?

Link to comment
Share on other sites

Hi kongondo! Glad to hear it works on Docker fine! On my system both, front and backend are slow. Found I can include the index.php to bootstrap the system. As soon as I include the file, it is noticeably slower even if I don't select anything from the DB or load any UI. I had established a plain PDO connection to the same DB and selected everything from the fields table. Although this is a lot less than the actual CMS loads, output is immediately in the browser.

My setup: Docker on Mac (updated today) with 4 GB RAM and 4 CPU

The Dockerfile for the webserver just includes php:7.2.2-apache and enables mod_rewrite

  db:
    image: mysql:5.7
    volumes:
      - "./.data/db:/var/lib/mysql"
    environment:
      MYSQL_DATABASE: processwire
      MYSQL_ROOT_PASSWORD: root
      MYSQL_USER: root
      MYSQL_PASSWORD: pass
    ports:
      - "9906:3306"
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    depends_on:
    - db
    external_links:
    - db:mysql
    ports:
    - "9090:80"
    environment:
        PMA_HOST: dbhost
        MYSQL_USER: root
        MYSQL_PASSWORD: pass
        MYSQL_ROOT_PASSWORD: root
  server:
    build: .
    volumes:
      - /Volumes/localdev/docker/processwire:/var/www/html
    ports:
      - "8100:80"
    stdin_open: true
    tty: true

 

Link to comment
Share on other sites

4 hours ago, SqANT said:

Found I can include the index.php to bootstrap the system.

So you are not running ProcessWire directly then? Any reason you are bootstrapping? I'm not saying this is the cause for the slowness, just wondering.

 

4 hours ago, SqANT said:

Docker on Mac (updated today) with 4 GB RAM and 4 CPU

Not sure if this is still the case, but there have been reports of docker being slow on Macs, generally (as well as when tty = true. => not sure about this though).

Other than that, nothing out of the ordinary jumps at me RE your Dockerfile. Let's get a few more thoughts.

Link to comment
Share on other sites

10 hours ago, kongondo said:

Not sure if this is still the case, but there have been reports of docker being slow on Macs, generally (as well as when tty = true. => not sure about this though).

Sadly I don't have an answer to the issue raised here, as I have only just started to play with ProcessWire and Docker, but I've got a very similar setup on a MacBook Pro (4 GB RAM and 6 CPU) for WordPress development – and I have to say that it's often painfully slow. This does seem to be a relatively common problem, at least for Mac users.

That being said, I'm running a fairly non-standard and complex WordPress stack, so it may strictly speaking be something other than the WP core which is the root cause – ACF or any of the other plugins, something in the theme, etc.

Link to comment
Share on other sites

11 hours ago, kongondo said:

So you are not running ProcessWire directly then? Any reason you are bootstrapping? I'm not saying this is the cause for the slowness, just wondering.

No, I saw this method and tried it beside running it normally. Both ways are slow.

 

11 hours ago, kongondo said:

Not sure if this is still the case, but there have been reports of docker being slow on Macs, generally (as well as when tty = true. => not sure about this though).

 

30 minutes ago, teppo said:

Sadly I don't have an answer to the issue raised here, as I have only just started to play with ProcessWire and Docker, but I've got a very similar setup on a MacBook Pro (4 GB RAM and 6 CPU) for WordPress development – and I have to say that it's often painfully slow. This does seem to be a relatively common problem, at least for Mac users.

That being said, I'm running a fairly non-standard and complex WordPress stack, so it may strictly speaking be something other than the WP core which is the root cause – ACF or any of the other plugins, something in the theme, etc.

Have some WordPress sites with a similar Docker setup and everything goes well.

I just updated my local dev environment (outside Docker) and copied the files and DB and it works nice and fast. So, I don't know why, but it seems to be related to Docker. But I am wondering why, since my Mac has good specs and WordPress runs smoothly, though haven't dockerized any other CMS.

Will investigate a little further and keep you updated.

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...