Skip to content

fabdao/docker-woonuxt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

45 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

docker-woonuxt

Welcome to this humble repo to facilitate Woonuxt development environment. Feel free to comment or correct. Due to the choice of Overlay2 filesysem for docker... should be working only on linux and maybe on mac.

Step 1 : Clone and set up repo

Clone repo πŸ₯·

git clone [email protected]:fabdao/docker-woonuxt.git

Navigate 🚣

cd docker-woonuxt

Fetch git submodule Woonuxt and Wordpres πŸ₯·πŸƒπŸͺ΅

git submodule init

git submodule update

Step 2 : Initiate Wordpress DataBase without reverse proxy service

Copy initial docker compose file for run βš’οΈπŸ‹

cp docker/initial.docker-compose.yml docker-compose.yml

Copy .env file β˜”βš οΈπŸ”«

cp docker/.env.example .env

Try to run docker 🐳

docker compose up

Command line helper

Display :: docker :: container πŸ–΅πŸ‹πŸͺΊ

List ALL Running Containers docker ps

Display :: docker :: container -all πŸ–΅πŸ‹πŸͺΉ

List ALL Running Containers (including STOPPED) docker ps -a

Stop :: docker :: container πŸͺΊπŸ‹πŸͺΉ

Unmount Docker containers docker compose down

Display :: docker :: logs πŸ–΅πŸ‹πŸ₯š

Display Docker logΒ΄s docker compose logs mysql-db

Display :: docker :: inspect πŸ–΅πŸ‹πŸ³

Display Docker logΒ΄s docker inspect mysql-db

System :: docker :: stop πŸ§‘β€πŸ’»πŸ‹βŒ

Stop Docker sudo systemctl stop docker

System :: docker :: start πŸ§‘β€πŸ’»πŸ‹βœ”οΈ

Start Docker sudo systemctl stop start

Troubleshooting mySQL

Error :: mysql :: healthcheck βŒπŸ’ΎπŸ§‘β€βš•οΈ

SQL error

Fix :: mysql :: healthcheck βœ”οΈπŸ’ΎπŸ§‘β€βš•οΈ

Update permissions for DB folder

sudo chown -R 999:999 ./docker/db/data

sudo chmod -R 770 ./docker/db/data

Troubleshooting Docker's volumes

Error :: filesystem :: overlay βŒπŸ“πŸ”

Volumes error

Check if Docker is using the correct FileSystem

Display docker's infos :

sudo docker info | grep -i overlay

Wrong output :

overlay output

Correct output :

overlay2 output

Fix :: filesystem :: overlay βœ”οΈπŸ“πŸ”

PrΓ©requiste : please take time to follow this guide (5min) : docker's overlay official documentation β˜•

Sum up for lazy devs from documentation above ☝️

Stop Docker sudo systemctl stop docker

Edit /etc/docker/daemon.json. If it doesn't yet exist, create it.

Assuming that the file was empty, add the following contents : { "storage-driver": "overlay2" }

Start Docker sudo systemctl stop start

⚠️ Docker doesn't start if the daemon.json file contains invalid JSON. ⚠️

Verify that the daemon is using the overlay2 storage driver docker info

Use the docker info command and look for Storage Driver Storage Driver: overlay2

πŸ™€πŸ€™ Remember the use the right docker engine πŸ€™πŸ™€β€‹

Change :: docker :: engine πŸ”πŸ‹πŸš‚

Chamge Docker engine

In my case only default works...

Set up Wordpress and required plugins

Open your browser to http://localhost, normally at this point you should be able to see this screen :

Wordpress first account

Install "Woonuxt Settings" plugin

Download Woonuxt Settings plugin πŸ“¦

An outdated ZIP to upload is also located at assets/woonuxt/woonuxt-settings.zip

Go to wordpress admin panel and install πŸ‘·

Upload woonuxt settings

Troubleshooting manual upload

Error : The uploaded file exceeds the upload_max_filesize ❌

Upload error max size

Fix : Modify .htaccess βœ”οΈ

Copy .htaccess from src/wordpress/.htaccess to docker/wordpress/.htaccess :

Edit docker/wordpress/.htaccess uncommenting the bottom line php_value upload_max_filesize 256M

Reset wordpress container folder permission sudo chown -R www-data:www-data docker/wordpress

Verify permission inside wordpress container docker exec -i wordpress-crm ls -l /var/www/html/.htaccess

Verify .htaccess inside wordpress container docker exec -i wordpress-crm cat /var/www/html/.htaccess

Error : Unable the write the wordpress upload folder ❌

Upload folder locked

Fix : Set Wordpress folder permissions βœ”οΈ

Reset wordpress container folder permission sudo chown -R www-data:www-data docker/wordpress

Install others required pluging ( Woocommerce, GraphQL and Headless-Login)

Go the plugin section, and open settings from 'woonuxt-setting'

other-plugin-install

Once installed :

Add http://localhost:3000 into Front End URL parameter and donΒ΄t forget to push SAVE Button at the end of this page...

Import dummy sample products :

Go to Tools > Import and install and run Wordpress importer (last one)!

worpdress-importer

Import assets/sample-data/sample_products.xml

dummy-import

Enable GraphQL public introspection

Rendez-vous at GraphQL > Settings > WPGraphQL General Settings section and set like so... WP-GQL-intro

Set-up Headless Login pluging

Rendez-vous at GraphQL > Settings > Headless section and set like so... ( maybe advanced options buttons should be toggle at the upper-right of the screen)

HLS-providers WP-HLS-AccessCTRL WP-HLS-Cookies

Step 3 : Start Woonuxt

Edit docker-compose.yml : uncomment the woonuxt service to enable it

DOCKER-woonuxt-disable DOCKER-woonuxt-enable

Moment of truth

Rebuild your stack : docker compose up 🀞

DOCKER-success-with-woonuxt

Visit http://localhost:3000

woonuxt-success-browser

About

Local DEV env : Docker + Woonuxt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages