-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from MurruAlessio/main
docker compose wordpress
- Loading branch information
Showing
6 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,3 +161,7 @@ cython_debug/ | |
.idea/ | ||
|
||
env | ||
|
||
*/wordpress-plugin | ||
*/wordpress-theme | ||
*/__MACOSX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |