Skip to content

Commit

Permalink
Merge pull request #27 from MurruAlessio/main
Browse files Browse the repository at this point in the history
docker compose wordpress
  • Loading branch information
peppelinux authored Jul 24, 2023
2 parents 8a1d4b1 + 3cb3c65 commit ef023aa
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 1 deletion.
Binary file added .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,7 @@ cython_debug/
.idea/

env

*/wordpress-plugin
*/wordpress-theme
*/__MACOSX
4 changes: 4 additions & 0 deletions example/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
MYSQL_DATABASE=wordpress
MYSQL_USER=wp_user
MYSQL_PASSWORD=wp_password
MYSQL_ROOT_PASSWORD=root_password
29 changes: 28 additions & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,31 @@ Run the stack
sudo docker-compose up
````

Point your web browser to `http://.....` to start your EUDI Wallet authentication to a Wordpress demo site.
Point your web browser to `http://localhost:8080` to start your EUDI Wallet authentication to a Wordpress demo site.


## First Installation

Follow the on-screen instructions to complete the WordPress installation.
1. You will be prompted to enter some basic information to complete the initial configuration of your WordPress site. This includes:
* Site Title: Enter a title for your WordPress site.
* Username: Choose a username for your administrator account.
* Password: Choose a strong password for your administrator account.
* Your Email: Enter an email address where you can receive notifications from your WordPress site.
* Search Engine Visibility: Choose whether or not you want search engines to index your site.
2. Click on the “Install WordPress” button to complete the initial configuration.

## Installing the ItaliaWP2 Theme

1. Log in to the WordPress dashboard at http://localhost:8080/wp-admin (replace 8080 with the port specified in the docker-compose.yml file) using your administrator credentials.
2. In the sidebar, go to “Appearance” > “Themes” and activate the ItaliaWP2 theme that you just installed.

After following these steps, your WordPress instance should be up and running with the ItaliaWP2 theme installed and activated.

## Installing the OneLogin SAML SSO plugin

1. Log in to the WordPress dashboard at http://localhost:8080/wp-admin (replace 8080 with the port specified in the docker-compose.yml file) using your administrator credentials.
2. Under [plugins](http://localhost:8080/wp-admin/plugins.php), activate the plugin OneLogin SAML SSO.
3. Configure the plugin OneLogin SAML SSO in the [settings tab](http://localhost:8080/wp-admin/options-general.php?page=onelogin_saml_configuration).

To configure a generic SAML connection, you will need to enter appropriate values in OneLogin SAML SSO plugin settings. These include Identity Provider URL, Assertion Consumer Service URL, Single Logout Service URL, and other parameters specific to your SAML configuration.
59 changes: 59 additions & 0 deletions example/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: '3.1'

services:
database:
mem_limit: 2048m
image: mariadb:10.6.4-focal
restart: unless-stopped
ports:
- 3306:3306
env_file: .env
environment:
MYSQL_DATABASE: '${MYSQL_DATABASE}'
MYSQL_USER: '${MYSQL_USER}'
MYSQL_PASSWORD: '${MYSQL_PASSWORD}'
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'
volumes:
- db-data:/var/lib/mysql
networks:
- wordpress-network

phpmyadmin:
depends_on:
- database
image: arm64v8/phpmyadmin:5.2.1-apache
restart: unless-stopped
ports:
- 8081:80
env_file: .env
environment:
PMA_HOST: database
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'
networks:
- wordpress-network

wordpress:
depends_on:
- database
image: wordpress:5.4.0-apache
restart: unless-stopped
ports:
- 8080:80
env_file: .env
environment:
WORDPRESS_DB_HOST: database:3306
WORDPRESS_DB_NAME: '${MYSQL_DATABASE}'
WORDPRESS_DB_USER: '${MYSQL_USER}'
WORDPRESS_DB_PASSWORD: '${MYSQL_PASSWORD}'
volumes:
- ./wordpress-plugin/onelogin-saml-sso/:/var/www/html/wp-content/plugins/onelogin-saml-sso/
- ./wordpress-theme/italiawp2/:/var/www/html/wp-content/themes/italiawp2/
networks:
- wordpress-network

volumes:
db-data:

networks:
wordpress-network:
driver: bridge
29 changes: 29 additions & 0 deletions example/docker-prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

plugin_url="https://downloads.wordpress.org/plugin/onelogin-saml-sso.zip"
theme_url="https://raw.githubusercontent.com/italia/design-wordpress-theme-italiaWP2/master/italiawp2.zip"
plugin_folder="./wordpress-plugin"
theme_folder="./wordpress-theme"

mkdir -p $plugin_folder
mkdir -p $theme_folder

#download and unzip of plugin
curl -O $plugin_url
unzip onelogin-saml-sso.zip
rm onelogin-saml-sso.zip

# Move the content of the subfolder to the specified folder
mv onelogin-saml-sso $plugin_folder

# Remove the empty folder
rmdir onelogin-saml-sso/onelogin-saml-sso
rmdir onelogin-saml-sso

#download and unzip of theme
curl -O $theme_url
unzip italiawp2.zip
rm italiawp2.zip

# Move the unzipped content to the specified folder
mv italiawp2 $theme_folder

0 comments on commit ef023aa

Please sign in to comment.