Commit b44c01e8 authored by Simon's avatar Simon

Merge branch 'release-1.12.2'

parents f535cd70 3209aacc
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
# Change these settings to your own preference
indent_style = space
indent_size = 4
# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
PROJECT=biuro-www PROJECT=biuro-www
IMAGE_NGINX=fholzer/nginx-brotli IMAGE_NGINX=fholzer/nginx-brotli
IMAGE_MYSQL=mariadb:10.3 IMAGE_MYSQL=mariadb:10.3
IMAGE_WORDPRESS=biuro/web:1.12.1 IMAGE_WORDPRESS=biuro/web:1.12.2
IMAGE_WORDPRESS_CLI=wordpress:cli-php7.3 IMAGE_WORDPRESS_CLI=wordpress:cli-php7.3
DB_NAME=www_biuro DB_NAME=www_biuro
DB_HOST=mysql DB_HOST=mysql
DB_USERNAME=www_user DB_USERNAME=www_user
DB_PASSWORD=qzl8pMNV^gZ&c1!7ebVsXqQh DB_PASSWORD=qzl8pMNV^gZ&c1!7ebVsXqQh
DB_ROOT_PASSWORD=#w1ML4QfWaR*8dBYRL7aZJI$ DB_ROOT_PASSWORD=#w1ML4QfWaR*8dBYRL7aZJI$
UID=33 UID=33
GID=33 GID=33
NGINX_NAME_LT=www.biuro.lt NGINX_NAME_LT=www.biuro.lt
NGINX_NAME_LV=www.biuro.lv NGINX_NAME_LV=www.biuro.lv
NGINX_NAME_EE=www.biuro.ee NGINX_NAME_EE=www.biuro.ee
* text=auto eol=lf
.idea/ .idea/
var/ var/
wordpress/ wordpress/
logs/nginx/*.log logs/nginx/*.log
version: '3.6' version: '3.6'
services: services:
mysql: mysql:
image: ${IMAGE_MYSQL} image: ${IMAGE_MYSQL}
container_name: "${PROJECT}-mysql" container_name: "${PROJECT}-mysql"
networks: networks:
- "back" - "back"
volumes: volumes:
- ./docker/mariadb:/docker-entrypoint-initdb.d/ - ./docker/mariadb:/docker-entrypoint-initdb.d/
- ./var/mariadb:/var/lib/mysql - ./var/mariadb:/var/lib/mysql
environment: environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD} - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_DATABASE=${DB_NAME} - MYSQL_DATABASE=${DB_NAME}
- MYSQL_USER=${DB_USERNAME} - MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD} - MYSQL_PASSWORD=${DB_PASSWORD}
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci --innodb-flush-method=fsync command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci --innodb-flush-method=fsync
restart: always restart: always
wordpress: wordpress:
image: ${IMAGE_WORDPRESS} image: ${IMAGE_WORDPRESS}
container_name: "${PROJECT}-wordpress" container_name: "${PROJECT}-wordpress"
networks: networks:
- "front" - "front"
- "back" - "back"
volumes: volumes:
- ./nginx/.htpasswd:/etc/nginx/.htpasswd - ./nginx/.htpasswd:/etc/nginx/.htpasswd
- ./nginx/php.ini:/usr/local/etc/php/conf.d/php.ini - ./nginx/php.ini:/usr/local/etc/php/conf.d/php.ini
- ./wordpress:/var/www/html - ./wordpress:/var/www/html
environment: environment:
- WORDPRESS_DB_NAME=${DB_NAME} - WORDPRESS_DB_NAME=${DB_NAME}
- WORDPRESS_DB_HOST=${DB_HOST} - WORDPRESS_DB_HOST=${DB_HOST}
- WORDPRESS_DB_USER=${DB_USERNAME} - WORDPRESS_DB_USER=${DB_USERNAME}
- WORDPRESS_DB_PASSWORD=${DB_PASSWORD} - WORDPRESS_DB_PASSWORD=${DB_PASSWORD}
- WORDPRESS_CONFIG_EXTRA= - WORDPRESS_CONFIG_EXTRA=
/* Multisite */ /* Multisite */
define( 'WP_ALLOW_MULTISITE', true ); define( 'WP_ALLOW_MULTISITE', true );
define('MULTISITE', true); define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true); define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', '${NGINX_NAME_LT}'); define('DOMAIN_CURRENT_SITE', '${NGINX_NAME_LT}');
define('PATH_CURRENT_SITE', '/'); define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1); define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1);
define( 'COOKIE_DOMAIN', '' ); define( 'COOKIE_DOMAIN', '' );
define( 'ADMIN_COOKIE_PATH', '/' ); define( 'ADMIN_COOKIE_PATH', '/' );
define( 'COOKIEPATH', '/' ); define( 'COOKIEPATH', '/' );
define( 'SITECOOKIEPATH', '/' ); define( 'SITECOOKIEPATH', '/' );
define( 'NOBLOGREDIRECT', '' ); define( 'NOBLOGREDIRECT', '' );
define( 'WP_HOME', 'https://${NGINX_NAME_LT}' ); define( 'WP_HOME', 'https://${NGINX_NAME_LT}' );
define( 'WP_SITEURL', 'https://${NGINX_NAME_LT}' ); define( 'WP_SITEURL', 'https://${NGINX_NAME_LT}' );
define( 'DISALLOW_FILE_EDIT', false ); define( 'DISALLOW_FILE_EDIT', false );
links: links:
- mysql - mysql
restart: always restart: always
nginx: nginx:
image: ${IMAGE_NGINX} image: ${IMAGE_NGINX}
container_name: "${PROJECT}-nginx" container_name: "${PROJECT}-nginx"
networks: networks:
- front - front
ports: ports:
- '80:80' - '80:80'
- '443:443' - '443:443'
volumes: volumes:
- ./nginx/.htpasswd:/etc/nginx/.htpasswd - ./nginx/.htpasswd:/etc/nginx/.htpasswd
- ./nginx/conf.d:/etc/nginx/conf.d - ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/h5bp:/etc/nginx/h5bp - ./nginx/h5bp:/etc/nginx/h5bp
- ./nginx/nginx.conf:/etc/nginx/nginx.conf - ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/redirects:/etc/nginx/redirects - ./nginx/redirects:/etc/nginx/redirects
- ./nginx/cache:/var/cache/nginx - ./nginx/cache:/var/cache/nginx
- ./logs/nginx:/var/log/nginx - ./logs/nginx:/var/log/nginx
- ./certs:/etc/letsencrypt - ./certs:/etc/letsencrypt
- ./certs-data:/data/letsencrypt - ./certs-data:/data/letsencrypt
- ./wordpress:/var/www/html - ./wordpress:/var/www/html
links: links:
- wordpress - wordpress
restart: always restart: always
wordpress-cli: wordpress-cli:
image: ${IMAGE_WORDPRESS_CLI} image: ${IMAGE_WORDPRESS_CLI}
user: "${UID}:${GID}" user: "${UID}:${GID}"
container_name: "${PROJECT}-wordpress-cli" container_name: "${PROJECT}-wordpress-cli"
links: links:
- wordpress - wordpress
- mysql - mysql
networks: networks:
- "back" - "back"
volumes: volumes:
- './var/wp-cli/cache:/etc/X11/fs/.wp-cli/cache' - './var/wp-cli/cache:/etc/X11/fs/.wp-cli/cache'
- ./wordpress:/var/www/html - ./wordpress:/var/www/html
- './wp-init.sh:/usr/local/bin/wp-init.sh' - './wp-init.sh:/usr/local/bin/wp-init.sh'
command: > command: >
/bin/sh -c ' /bin/sh -c '
sleep 25; sleep 25;
echo "WP CLI init"; echo "WP CLI init";
wp core update --force; wp core update --force;
wp core update-db --network; wp core update-db --network;
wp language core update; wp language core update;
wp language theme update --all; wp language theme update --all;
wp language plugin update --all; wp language plugin update --all;
echo "WP CLI done. Ready to use."; echo "WP CLI done. Ready to use.";
' '
networks: networks:
front: front:
name: "${PROJECT}-front" name: "${PROJECT}-front"
back: back:
name: "${PROJECT}-back" name: "${PROJECT}-back"
volumes: volumes:
wordpress: { } wordpress: { }
wp-content: { } wp-content: { }
This diff is collapsed.
sleep 30; sleep 30;
echo "WP CLI init" echo "WP CLI init"
# !/usr/bin/env sh # !/usr/bin/env sh
# Install WordPress. # Install WordPress.
# wp core install \ # wp core install \
# --path="/var/www/html"\ # --path="/var/www/html"\
# --title="Biuro" \ # --title="Biuro" \
# --admin_user="biuro" \ # --admin_user="biuro" \
# --admin_password="laikinas2587" \ # --admin_password="laikinas2587" \
# --admin_email="info@biuro.eu" \ # --admin_email="info@biuro.eu" \
# --url="https://dev.biuro.lt" \ # --url="https://dev.biuro.lt" \
# --skip-email # --skip-email
# https://www.exove.com/blog/developing-with-wordpress-part-4-wp-cli-basics/ # https://www.exove.com/blog/developing-with-wordpress-part-4-wp-cli-basics/
# https://developer.wordpress.org/cli/commands/ # https://developer.wordpress.org/cli/commands/
# WP update # WP update
wp core update --force wp core update --force
wp core update-db --network wp core update-db --network
# Update permalink structure. # Update permalink structure.
wp option update permalink_structure "/%postname%/" --skip-themes --skip-plugins wp option update permalink_structure "/%postname%/" --skip-themes --skip-plugins
# wp option update timezone_string "Europe/Vilnius" # wp option update timezone_string "Europe/Vilnius"
# wp option update date_format "Y-m-d" # wp option update date_format "Y-m-d"
wp option update time_format "H:i" wp option update time_format "H:i"
# Install plugins # Install plugins
# wp plugin install permalink-manager --force --activate-network # wp plugin install permalink-manager --force --activate-network
wp plugin install pods --activate-network wp plugin install pods --activate-network
wp plugin install polylang --activate-network wp plugin install polylang --activate-network
wp plugin install wordpress-seo --activate-network wp plugin install wordpress-seo --activate-network
wp plugin install loco-translate --activate-network; wp plugin install loco-translate --activate-network;
wp plugin install google-sitemap-generator --activate-network; wp plugin install google-sitemap-generator --activate-network;
# Update all plugins # Update all plugins
wp plugin update --all wp plugin update --all
# Activate plugin. # Activate plugin.
wp plugin activate akismet --network wp plugin activate akismet --network
wp plugin activate biuro-contacts --network wp plugin activate biuro-contacts --network
wp plugin activate biuro-feedbacks --network wp plugin activate biuro-feedbacks --network
wp plugin activate biuro-html --network wp plugin activate biuro-html --network
wp plugin activate biuro-sections --network wp plugin activate biuro-sections --network
wp plugin activate biuro-services --network wp plugin activate biuro-services --network
wp plugin activate biuro-values --network wp plugin activate biuro-values --network
wp plugin activate cookies-warning --network wp plugin activate cookies-warning --network
wp plugin activate data-controller --network wp plugin activate data-controller --network
wp plugin activate jobs-importer --network wp plugin activate jobs-importer --network
# WP themes # WP themes
wp theme update --all wp theme update --all
wp theme activate biuro wp theme activate biuro
# Update translations # Update translations
wp language core update wp language core update
wp language theme update --all wp language theme update --all
wp language plugin update --all wp language plugin update --all
echo "WP CLI done. Ready to use." echo "WP CLI done. Ready to use."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment