GithubHelp home page GithubHelp logo

pie-inc / docker-wordpress-multisite Goto Github PK

View Code? Open in Web Editor NEW
36.0 3.0 17.0 351 KB

Docker WordPress Multisite Boilerplate

License: MIT License

JavaScript 1.33% CSS 1.05% PHP 16.00% Shell 55.52% Dockerfile 26.10%
docker wordpress wordpress-multisite nginx-docker docker-compose nodejs tailwindcss vite

docker-wordpress-multisite's Introduction

⚠️ PHP 7.3 + Webpack version moved to webpack branch -- The 7.4 version theme makes use of Vite, so there are breaking updates to current developments!

⚠️ master branch changed to main

Docker WordPress Multisite

Pre-requisites

Nodejs

  • Install Node for your platform.

Docker

Getting started

Clone this repository:

git clone [email protected]:pie-inc/docker-wordpress-multisite.git <TARGET FOLDER>

Then install dependencies: npm i or yarn

Once all packages have been installed, run yarn start to build the docker images, start the docker containers and watch all source files for changes.

Alternatively you can just run npm run serve, yarn serve or docker-compose up -d to download/build the docker images and start the server.

A few folders and files will be created inside ./data for debugging, mainly mysql. These folders are local and will not be included in the git flow.

Go through the famous 5-minute wordpress instalation by going to http://localhost:8080

Enabling multisite

In line 220 or data/docker-entrypoint.sh, update the email section to the admin email.

Jump into the wordpress container, enable multisite with WP-CLI and update the .htaccess, making a backup of the original.

docker-compose exec wp bash
wp core multisite-convert
mv .htaccess backup.htaccess
mv multisite.htaccess .htaccess

local SSL Certificates

You will need install makecert.

Using homebrew:

brew install mkcert
brew install nss # if you use Firefox
mkcert -install

Then, you will have to generate the Certificates and dh parameters

mkcert localhost 127.0.0.1 ::1
openssl dhparam -out dh.pem 2066

And finally copy the certificates from the mentioned location in the terminal into ./data/certs/ nginx expects the files to have the following naming structure: dh.pem ssl.crt ssl.key. The nomenclature can be updated at data/nginx/wordpress.conf

You can also generate your own, or use existing ones you might have. (Using openSSL)

FAQ

Does it work immediately?

Nope.

What if I don't want to use SSL?

You have to change quite a few settings, like the nginx configuration file.

I'd like to start fresh, what do I do?

Type npm run reset or yarn reset and voilà!

This is not working properly in Windows... Help!

Although it might work in Windows, I have only used this process in *NIX machines. Some commands might have to be altered in package.json to adapt for proper Windows usage.

docker-wordpress-multisite's People

Contributors

dependabot[bot] avatar offeringofpie avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

docker-wordpress-multisite's Issues

Can't find Nginx at Localhost

Awesome repository, thanks for cataloging WordPress Multisite docker config!

I'm getting no response at localhost:8080 after bringing docker-compose up. All services are running. I have no custom settings or environment variables.

Any ideas?

WordPress container doesn't start up

hello!

Firstly, thanks for putting this together and making it public!

I have the following problem after I run npm run serve. The WordPress container doesn't start. When checking the container logs, I see those sed permission denied errors.

Would you happen to have any idea how to fix that?

  • OS: MacOS
  • Docker: 4.24.2
Screenshot 2023-11-04 at 12 31 53

Update stack

  • Update PHP container to version 7.4
  • Update Wordpress to 6.0.1
  • Redo theme development stack from webpack to vite
  • Remove css bundling mess from node-sass to tailwindcss

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.