diff --git a/docs/images/WordPress_Adding_SSL_Certificate.PNG b/docs/images/WordPress_Adding_SSL_Certificate.PNG new file mode 100644 index 0000000..45033f4 Binary files /dev/null and b/docs/images/WordPress_Adding_SSL_Certificate.PNG differ diff --git a/docs/images/WordPress_Enable_SSL_Certificate.PNG b/docs/images/WordPress_Enable_SSL_Certificate.PNG new file mode 100644 index 0000000..8fa2a5f Binary files /dev/null and b/docs/images/WordPress_Enable_SSL_Certificate.PNG differ diff --git a/docs/images/WordPress_New_Proxy_Host.PNG b/docs/images/WordPress_New_Proxy_Host.PNG new file mode 100644 index 0000000..410bd01 Binary files /dev/null and b/docs/images/WordPress_New_Proxy_Host.PNG differ diff --git a/docs/images/WordPress_Portainer_Stack_Installation.PNG b/docs/images/WordPress_Portainer_Stack_Installation.PNG new file mode 100644 index 0000000..fcc4b09 Binary files /dev/null and b/docs/images/WordPress_Portainer_Stack_Installation.PNG differ diff --git a/docs/wordpress_installation.md b/docs/wordpress_installation.md new file mode 100644 index 0000000..a400740 --- /dev/null +++ b/docs/wordpress_installation.md @@ -0,0 +1,31 @@ +# WORDPRESS + SSL SETUP + +### WORDPRESS STACK + +Remember to choose a port for http not used for another service and a username and password for the mysql server used by wordpress + +![Stack_Install](https://raw.githubusercontent.com/novaspirit/pi-hosted/master/docs/images/WordPress_Portainer_Stack_Installation.PNG) + +### Nginx Proxy Manager + +[Novaspirit Tech - Nginx Proxy Manager Installation](https://www.youtube.com/watch?v=yl2Laxbqvo8) + +We now have to add a host to redirect all the traffic to the correct port + +![WordPress New Proxy Host](https://raw.githubusercontent.com/novaspirit/pi-hosted/master/docs/images/WordPress_New_Proxy_Host.PNG) + +Now you should be able with www.your_domain_here to access your site from the outside (if you have port 80 and 443 open) + +### HOW TO ENABLE SSL + +To use the site as a shop you should enable SSL by using Let's Encrypt in the Nginx dashboard + +![WordPress Adding SSL Certificate](https://raw.githubusercontent.com/novaspirit/pi-hosted/master/docs/images/WordPress_Adding_SSL_Certificate.PNG) + +Remember to add the certificate to the proxy host +![WordPress Enable SSL Certificate](https://raw.githubusercontent.com/novaspirit/pi-hosted/master/docs/images/WordPress_Enable_SSL_Certificate.PNG) + + +### OFFLINE SETUP + +Just proceed after you deploy the stack to access the site using the correct ip address and port combination diff --git a/images/wordpress.png b/images/wordpress.png new file mode 100644 index 0000000..7f8a86b Binary files /dev/null and b/images/wordpress.png differ diff --git a/stack/wordpress-stack.yml b/stack/wordpress-stack.yml new file mode 100644 index 0000000..064a9ba --- /dev/null +++ b/stack/wordpress-stack.yml @@ -0,0 +1,39 @@ +version: '3.1' + +services: + + wordpress: + image: wordpress + container_name: wordpress:latest + restart: unless-stopped + ports: + - ${WEB_SERVER_PORT}:80 + environment: + WORDPRESS_DB_HOST: db:3306 + WORDPRESS_DB_USER: ${MYSQL_DATABASE_USER_NAME} + WORDPRESS_DB_PASSWORD: ${MYSQL_DATABASE_PASSWORD} + WORDPRESS_DB_NAME: wordpress + networks: + - wordpress + volumes: + - wordpress:/var/www/html + + db: + image: jc21/mariadb-aria:latest + restart: unless-stopped + environment: + MYSQL_DATABASE: wordpress + MYSQL_USER: ${MYSQL_DATABASE_USER_NAME} + MYSQL_PASSWORD: ${MYSQL_DATABASE_PASSWORD} + MYSQL_ROOT_PASSWORD: ${MYSQL_DATABASE_ROOT_PASSWORD} + networks: + - wordpress + volumes: + - db:/var/lib/mysql + +volumes: + wordpress: + db: + +networks: + wordpress: \ No newline at end of file diff --git a/template/portainer-v2-arm32.json b/template/portainer-v2-arm32.json index 543d3d7..f368d6b 100644 --- a/template/portainer-v2-arm32.json +++ b/template/portainer-v2-arm32.json @@ -4785,6 +4785,44 @@ "url": "https://github.com/novaspirit/pi-hosted" } }, + { + "categories":[ + "WordPress", + "Web" + ], + "description":"Wordpress setup with a MySQL database", + "env":[ + { + "default": "5080", + "name":"WEB_SERVER_PORT", + "label":"External Port for webserver forward to port 80" + }, + { + "default": "wordpress", + "name":"MYSQL_DATABASE_USER_NAME", + "label":"Database user name" + }, + { + "name":"MYSQL_DATABASE_PASSWORD", + "label":"Database password for user" + }, + { + "name":"MYSQL_DATABASE_ROOT_PASSWORD", + "label":"Database root password" + } + ], + "logo":"https://raw.githubusercontent.com/novaspirit/pi-hosted/master/images/wordpress.png", + "note":"Deploys a Wordpress instance connected to a MySQL database.", + + "platform":"linux", + + "repository":{ + "url": "https://github.com/novaspirit/pi-hosted", + "stackfile": "stack/wordpress-stack.yml" + }, + "title":"Wordpress", + "type": 3 + }, { "categories": [ "Other", @@ -4886,4 +4924,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/template/portainer-v2-arm64.json b/template/portainer-v2-arm64.json index 9c0a19a..bae696a 100644 --- a/template/portainer-v2-arm64.json +++ b/template/portainer-v2-arm64.json @@ -4825,6 +4825,44 @@ "url": "https://github.com/novaspirit/pi-hosted" } }, + { + "categories":[ + "WordPress", + "Web" + ], + "description":"Wordpress setup with a MySQL database", + "env":[ + { + "default": "5080", + "name":"WEB_SERVER_PORT", + "label":"External Port for webserver forward to port 80" + }, + { + "default": "wordpress", + "name":"MYSQL_DATABASE_USER_NAME", + "label":"Database user name" + }, + { + "name":"MYSQL_DATABASE_PASSWORD", + "label":"Database password for user" + }, + { + "name":"MYSQL_DATABASE_ROOT_PASSWORD", + "label":"Database root password" + } + ], + "logo":"https://raw.githubusercontent.com/novaspirit/pi-hosted/master/images/wordpress.png", + "note":"Deploys a Wordpress instance connected to a MySQL database.", + + "platform":"linux", + + "repository":{ + "url": "https://github.com/novaspirit/pi-hosted", + "stackfile": "stack/wordpress-stack.yml" + }, + "title":"Wordpress", + "type": 3 + }, { "categories": [ "Other",