forked from coop-cloud/wordpress
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			2.2.0+6.1.
			...
			ssh
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| d2a3fc6937 | 
							
								
								
									
										
											BIN
										
									
								
								.abra.sh.swp
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.abra.sh.swp
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.compose.yml.swo
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.compose.yml.swo
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.compose.yml.swp
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.compose.yml.swp
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										24
									
								
								.env.sample
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								.env.sample
									
									
									
									
									
								
							| @ -5,14 +5,18 @@ DOMAIN=wordpress.example.com | |||||||
| #EXTRA_DOMAINS=', `www.wordpress.example.com`' | #EXTRA_DOMAINS=', `www.wordpress.example.com`' | ||||||
| LETS_ENCRYPT_ENV=production | LETS_ENCRYPT_ENV=production | ||||||
|  |  | ||||||
|  | # Necessary for optional features, leave this alone: | ||||||
|  | COMPOSE_FILE="compose.yml" | ||||||
|  |  | ||||||
| ## Additional extensions | ## Additional extensions | ||||||
| #PHP_EXTENSIONS="calendar" | #PHP_EXTENSIONS="calendar" | ||||||
|  |  | ||||||
| SECRET_DB_ROOT_PASSWORD_VERSION=v1 | SECRET_DB_ROOT_PASSWORD_VERSION=v1 | ||||||
| SECRET_DB_PASSWORD_VERSION=v1 | SECRET_DB_PASSWORD_VERSION=v1 | ||||||
|  |  | ||||||
| # Mostly for compatibility with existing database dumps... | # SSH access | ||||||
| #WORDPRESS_TABLE_PREFIX=wp_ | #COMPOSE_FILE="$COMPOSE_FILE:compose.ssh.yml" | ||||||
|  | #SSH_PUBLIC_KEY=<your pubkey here> | ||||||
|  |  | ||||||
| # Multisite | # Multisite | ||||||
| #WORDPRESS_CONFIG_EXTRA="\ | #WORDPRESS_CONFIG_EXTRA="\ | ||||||
| @ -20,15 +24,25 @@ SECRET_DB_PASSWORD_VERSION=v1 | |||||||
| #	define('WP_ALLOW_MULTISITE', true );" | #	define('WP_ALLOW_MULTISITE', true );" | ||||||
|  |  | ||||||
| # Multisite phase 2 (see README) | # Multisite phase 2 (see README) | ||||||
| # WORDPRESS_CONFIG_EXTRA="define('MULTISITE', true); define('SUBDOMAIN_INSTALL', true); define('DOMAIN_CURRENT_SITE', '${DOMAIN}'); define('PATH_CURRENT_SITE', '/');	define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); define('FORCE_SSL_ADMIN', true ); define('COOKIE_DOMAIN', \$_SERVER['HTTP_HOST']);" | #WORDPRESS_CONFIG_EXTRA="\ | ||||||
|  | #	define('WP_CACHE', false);\ | ||||||
|  | #	define('WP_ALLOW_MULTISITE', true );\ | ||||||
|  | #	define('MULTISITE', true);\ | ||||||
|  | #	define('SUBDOMAIN_INSTALL', true);\ | ||||||
|  | #	define('DOMAIN_CURRENT_SITE', '${DOMAIN}');\ | ||||||
|  | #	define('PATH_CURRENT_SITE', '/');\ | ||||||
|  | #	define('SITE_ID_CURRENT_SITE', 1);\ | ||||||
|  | #	define('BLOG_ID_CURRENT_SITE', 1);\ | ||||||
|  | #	define('FORCE_SSL_ADMIN', true );\ | ||||||
|  | #	define('COOKIE_DOMAIN', \$_SERVER['HTTP_HOST']);" | ||||||
|  |  | ||||||
| # Local SMTP relay | # Local SMTP relay | ||||||
| #COMPOSE_FILE="compose.yml:compose.mailrelay.yml" | #COMPOSE_FILE="$COMPOSE_FILE:compose.mailrelay.yml" | ||||||
| #SMTP_HOST="postfix_relay_app" | #SMTP_HOST="postfix_relay_app" | ||||||
| #MAIL_FROM="wordpress@example.com" | #MAIL_FROM="wordpress@example.com" | ||||||
|  |  | ||||||
| # Remote SMTP relay | # Remote SMTP relay | ||||||
| #COMPOSE_FILE="compose.yml:compose.mailrelay.yml:compose.smtp.yml" | #COMPOSE_FILE="$COMPOSE_FILE:compose.smtp.yml" | ||||||
| #SMTP_HOST="mail.example.com" | #SMTP_HOST="mail.example.com" | ||||||
| #MAIL_FROM="wordpress@example.com" | #MAIL_FROM="wordpress@example.com" | ||||||
| #SMTP_PORT=587 | #SMTP_PORT=587 | ||||||
|  | |||||||
| @ -32,7 +32,10 @@ Coöp Cloud + [Wordpress](https://wordpress.org) = 🥳 | |||||||
|  |  | ||||||
| ## Running WP-CLI | ## Running WP-CLI | ||||||
|  |  | ||||||
| `abra app cmd YOURAPPDOMAIN app wp -- core check-update --major` | `abra app YOURAPPDOMAIN wp 'core check-update --major'` | ||||||
|  |  | ||||||
|  | (the WP-CLI arguments need to be quoted, because of how `abra` handles | ||||||
|  | command-line arguments) | ||||||
|  |  | ||||||
| ## Network (Multi-site) | ## Network (Multi-site) | ||||||
|  |  | ||||||
|  | |||||||
							
								
								
									
										12
									
								
								abra.sh
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								abra.sh
									
									
									
									
									
								
							| @ -1,16 +1,8 @@ | |||||||
| export PHP_UPLOADS_CONF_VERSION=v3 | export PHP_UPLOADS_CONF_VERSION=v3 | ||||||
| export ENTRYPOINT_CONF_VERSION=v3 | export ENTRYPOINT_CONF_VERSION=v2 | ||||||
| export ENTRYPOINT_MAILRELAY_CONF_VERSION=v2 | export ENTRYPOINT_MAILRELAY_CONF_VERSION=v1 | ||||||
| export MSMTP_CONF_VERSION=v3 | export MSMTP_CONF_VERSION=v3 | ||||||
|  |  | ||||||
| wp() { |  | ||||||
|   /usr/local/bin/wp $@ |  | ||||||
| } |  | ||||||
|  |  | ||||||
| fix_mysql() { |  | ||||||
|   echo "ALTER TABLE mysql.column_stats MODIFY histogram longblob; ALTER TABLE mysql.column_stats MODIFY hist_type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB');" | mysql -u root -p$(cat /run/secrets/db_root_password) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| sub_wp() { | sub_wp() { | ||||||
|   CONTAINER=$(docker container ls -f "Name=${STACK_NAME}_app" --format '{{ .ID }}') |   CONTAINER=$(docker container ls -f "Name=${STACK_NAME}_app" --format '{{ .ID }}') | ||||||
|   if [ -z "$CONTAINER" ]; then |   if [ -z "$CONTAINER" ]; then | ||||||
|  | |||||||
| @ -6,7 +6,6 @@ services: | |||||||
|     entrypoint: /docker-entrypoint.mailrelay.sh |     entrypoint: /docker-entrypoint.mailrelay.sh | ||||||
|     environment: |     environment: | ||||||
|       - SMTP_HOST=${SMTP_HOST} |       - SMTP_HOST=${SMTP_HOST} | ||||||
|       - SMTP_PORT=${SMTP_PORT:-25} |  | ||||||
|       - MAIL_FROM=${MAIL_FROM} |       - MAIL_FROM=${MAIL_FROM} | ||||||
|     configs: |     configs: | ||||||
|       - source: mstmp_conf |       - source: mstmp_conf | ||||||
|  | |||||||
							
								
								
									
										27
									
								
								compose.ssh.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								compose.ssh.yml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | |||||||
|  | --- | ||||||
|  | version: "3.8" | ||||||
|  |  | ||||||
|  | services: | ||||||
|  |   ssh: | ||||||
|  |     image: lscr.io/linuxserver/openssh-server | ||||||
|  |     environment: | ||||||
|  |       - PUID=33 | ||||||
|  |       - PGID=33 | ||||||
|  |       - PUBLIC_KEY=${SSH_PUBLIC_KEY} | ||||||
|  |       - USER_NAME=wordpress | ||||||
|  |       - PASSWORD_ACCESS=false | ||||||
|  |     networks: | ||||||
|  |       - proxy | ||||||
|  |     deploy: | ||||||
|  |       update_config: | ||||||
|  |         failure_action: rollback | ||||||
|  |         order: start-first | ||||||
|  |       labels: | ||||||
|  |         - "traefik.enable=true" | ||||||
|  |         - "traefik.tcp.routers.${STACK_NAME}-ssh.rule=HostSNI(`*`)" | ||||||
|  |         - "traefik.tcp.routers.${STACK_NAME}-ssh.entrypoints=gitea-ssh" | ||||||
|  |         - "traefik.tcp.services.${STACK_NAME}-ssh.loadbalancer.server.port=2222" | ||||||
|  |  | ||||||
|  | networks: | ||||||
|  |   proxy: | ||||||
|  |     external: true | ||||||
							
								
								
									
										18
									
								
								compose.yml
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								compose.yml
									
									
									
									
									
								
							| @ -3,20 +3,18 @@ version: "3.8" | |||||||
|  |  | ||||||
| services: | services: | ||||||
|   app: |   app: | ||||||
|     image: "wordpress:6.1.1" |     image: "wordpress:5.8.1" | ||||||
|     volumes: |     volumes: | ||||||
|       - "wordpress_content:/var/www/html/wp-content/" |       - "wordpress_content:/var/www/html/wp-content/" | ||||||
|     networks: |     networks: | ||||||
|       - backend |       - backend | ||||||
|       - proxy |       - proxy | ||||||
|     environment: |     environment: | ||||||
|       - PAGER=more |  | ||||||
|       - WORDPRESS_DB_HOST=db |       - WORDPRESS_DB_HOST=db | ||||||
|       - WORDPRESS_DB_USER=wordpress |       - WORDPRESS_DB_USER=wordpress | ||||||
|       - WORDPRESS_DB_PASSWORD_FILE=/run/secrets/db_password |       - WORDPRESS_DB_PASSWORD_FILE=/run/secrets/db_password | ||||||
|       - WORDPRESS_DB_NAME=wordpress |       - WORDPRESS_DB_NAME=wordpress | ||||||
|       - WORDPRESS_CONFIG_EXTRA=${WORDPRESS_CONFIG_EXTRA} |       - WORDPRESS_CONFIG_EXTRA=${WORDPRESS_CONFIG_EXTRA} | ||||||
|       - WORDPRESS_TABLE_PREFIX |  | ||||||
|       - PHP_EXTENSIONS |       - PHP_EXTENSIONS | ||||||
|     secrets: |     secrets: | ||||||
|       - db_password |       - db_password | ||||||
| @ -50,12 +48,10 @@ services: | |||||||
|         #- "traefik.http.routers.${STACK_NAME}.rule=HostRegexp(`{subdomain:.+}.${DOMAIN}`, `${DOMAIN}`)" |         #- "traefik.http.routers.${STACK_NAME}.rule=HostRegexp(`{subdomain:.+}.${DOMAIN}`, `${DOMAIN}`)" | ||||||
|         - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" |         - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" | ||||||
|         - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" |         - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" | ||||||
|         - "coop-cloud.${STACK_NAME}.version=2.2.0+6.1.1" |         - "coop-cloud.${STACK_NAME}.version=1.0.0+5.8.1" | ||||||
|         - "backupbot.backup=true" |  | ||||||
|         - "backupbot.backup.path=/var/www/html" |  | ||||||
|  |  | ||||||
|   db: |   db: | ||||||
|     image: "mariadb:10.8" |     image: "mariadb:10.6" | ||||||
|     volumes: |     volumes: | ||||||
|       - "mariadb:/var/lib/mysql" |       - "mariadb:/var/lib/mysql" | ||||||
|     networks: |     networks: | ||||||
| @ -68,14 +64,6 @@ services: | |||||||
|     secrets: |     secrets: | ||||||
|       - db_password |       - db_password | ||||||
|       - db_root_password |       - db_root_password | ||||||
|     deploy: |  | ||||||
|       labels: |  | ||||||
|         backupbot.backup: "true" |  | ||||||
|         backupbot.backup.path: "/tmp/dump.sql.gz" |  | ||||||
|         backupbot.backup.pre-hook: "sh -c 'mysqldump --single-transaction -u root -p\"$$(cat /run/secrets/db_root_password)\" wordpress | gzip > /tmp/dump.sql.gz'" |  | ||||||
|         backupbot.backup.post-hook: "rm -f /tmp/dump.sql.gz" |  | ||||||
|         backupbot.restore: "true" |  | ||||||
|         backupbot.restore.post-hook: "sh -c 'mysql -u root -p\"$$(cat /run/secrets/db_root_password)\" wordpress < /tmp/dbdump.sql && rm -f /tmp/dbdump.sql'" |  | ||||||
|  |  | ||||||
| networks: | networks: | ||||||
|   backend: |   backend: | ||||||
|  | |||||||
| @ -3,5 +3,3 @@ | |||||||
| apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y msmtp && rm -rf /var/lib/apt/lists/* | apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y msmtp && rm -rf /var/lib/apt/lists/* | ||||||
|  |  | ||||||
| echo "sendmail_path = /usr/bin/msmtp -t -i" > /usr/local/etc/php/conf.d/sendmail.ini | echo "sendmail_path = /usr/bin/msmtp -t -i" > /usr/local/etc/php/conf.d/sendmail.ini | ||||||
|  |  | ||||||
| /docker-entrypoint.sh |  | ||||||
|  | |||||||
| @ -4,9 +4,6 @@ | |||||||
| docker-php-ext-install {{ env "PHP_EXTENSIONS" }} | docker-php-ext-install {{ env "PHP_EXTENSIONS" }} | ||||||
| {{ end }} | {{ end }} | ||||||
|  |  | ||||||
| curl -z /usr/local/bin/wp -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar |  | ||||||
| chmod +x /usr/local/bin/wp |  | ||||||
|  |  | ||||||
| if [ -n "$@" ]; then | if [ -n "$@" ]; then | ||||||
| 	"$@" | 	"$@" | ||||||
| fi | fi | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user