my name is Marek. I found a ClassicPress on AlternativeTo portal, as I was looking for an alternative to WordPress. CP is what I was looking for The only thing missing was no Docker Image available. So I spend couple of days preparing an image on my own.
It’s based on php:7.4-apache-bullseye Docker image. I have bundled all php extensions needed. Also apache-mod-security2 + OWASP CRS is on board.
Feel free to test it.
After few more days of work, a few more iterations, and tweaks, tag cp1.3.1-rev3 is working pretty fine
I have added docker-secrets support, and X-FORWARDED-PROTO header to wp-config template.
I have moved all 4 WordPress 5.x instances, that I had under my control, that so far was handled by WordOps. ClassicPress is working fantastic, and I couldn’t ask more. Thank you for your work CP Team!
We’ll be making a page with all the hosting resources available for CP. I will make sure we list your Docker, this is a great option for local testing and production deployment.
I was wondering if this can be updated? The last version is 1.4.4 in the Github repo.
I also came across this:Docker - - if this works, could someone please share a docker config/compose for this? Thanks!
You can also use the same image for production if you know what you are doing. By default the image uses localhost if you’re on a local machine. If you are interested in using as a production server… you will need to configure a nginx file for your site and certbot if you want let’s encrypt so that’s something that’s doable.
Is there any way things like site title, admin username, password and email can be added to the compose, so we can have something akin to a “one-click” install?
I’m also having trouble getting this thing to work with multisites - - I tried using the enable multisite define in wp-config, and when I went to network setup it said that multisite wouldn’t work on the port (I’m running this in host port 31696). Non-multisite works fine, though.
@getkoded007 This dockerized Classicpress (classicpress/classicpress) doesn’t seem to have GZip enabled. When I tried adding HTACCESS rules for enabling GZip I got 500 errors. How can I enable Gzip?
If you haven’t added an additional module to your Docker Image, the user will need to create a new Docker Image on top of yours. Sure that it’s common practice, but it’s totally not practical for users. Additionally, your image contains standard Apache configuration which is on the Top 10 OWASP. In my opinion, this is the responsibility of the image creator to provide a secure image, because most of the users still have very limited knowledge about HTTP headers, cookies settings, etc.
I can update my image for the newest CP and php 8. I’m also a bit surprised that the CP team is inventing the wheel, as I could gladly transfer the ownership of the image to you, but no one even asked. I mean - it’s up to you, but its strange for me tbh.
Thanks for updating your docker image!
Just a few questions, if you don’t mind:
I didn’t quite understand the UID/GID and why its needed. What values should i set for these? Should they be different for each site/docker container?
do all the sites share the same mySQL container or does each site have its own associated db container?
how can I access the dockerized mySQL using phpmyadmin?
Sorry if these have obvious answers, I’m kinda new to containers, just figuring things out. Thanks!
I didn’t quite understand the UID/GID and why its needed. What values should i set for these?
Should they be different for each site/docker container?
do all the sites share the same mySQL container or does each site have its own associated db container?
This is fully up to you. On one hand having a separate SQL instance for each WP instance is gives you more stability and that eg 10 sites do not have single point of failure. On the other hand, you will need ~10x more hardware resources. Personall I would say that if it’s your personal sites that do not need to have ~99,99% uptime, then go with 1 SQL.
how can I access the dockerized mySQL using phpmyadmin?
our main focus currently is to have a working classicpress image which we currently have, we don’t need to add phpmyadmin or other images to the official CP official docker hub since we can use the official images such as mailhog, mailcatcher, MySQL, MariaDB and phpMyAdmin.
Our current objective is right now is to create mulitple verions of CP images for PHP, one for 7.4, 8.0, 8.1 and 8.2 and so on. We will eventually create not just one apache server image but we probably will end up creating one for Nginx as well.
When you didn’t reply to the issue on Github in January, I figured it was no longer maintained. So we decided to proceed with our own Docker implementation. We aim to eventually provide the most common implementations that users can deploy (default CP image, Apache, Nginx, LiteSpeed, etc.). We welcome and would appreciate any help you can provide. Feel free to join Slack #docker channel.