Compare commits
8 Commits
c6988527fa
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 4eec5aa935 | |||
| a1a32bb636 | |||
| b7c8c0f9c9 | |||
| d0168d7b7d | |||
| 4562bbe9c5 | |||
| 9892f2caf5 | |||
| ee431c79df | |||
| 9d0844e9a4 |
+32
-9
@@ -1,10 +1,33 @@
|
|||||||
.env
|
# ignora tudo do WP
|
||||||
|
/webroot/*
|
||||||
|
|
||||||
|
# permite wp-content
|
||||||
|
!/webroot/wp-content/
|
||||||
|
|
||||||
|
# ignora tudo dentro de wp-content
|
||||||
|
/webroot/wp-content/*
|
||||||
|
|
||||||
|
# permite as pastas (mas não o conteúdo delas)
|
||||||
|
!/webroot/wp-content/plugins/
|
||||||
|
!/webroot/wp-content/themes/
|
||||||
|
!/webroot/wp-content/mu-plugins/
|
||||||
|
|
||||||
|
/webroot/wp-content/plugins/*
|
||||||
|
/webroot/wp-content/themes/*
|
||||||
|
/webroot/wp-content/mu-plugins/*
|
||||||
|
|
||||||
|
# permite o .gitkeep para que a pasta vazia seja versionada
|
||||||
|
!/webroot/wp-content/plugins/.gitkeep
|
||||||
|
!/webroot/wp-content/themes/.gitkeep
|
||||||
|
!/webroot/wp-content/mu-plugins/.gitkeep
|
||||||
|
|
||||||
|
# se no futuro quiser versionar algo específico:
|
||||||
|
# !/webroot/wp-content/themes/seu-tema/
|
||||||
|
# !/webroot/wp-content/themes/seu-tema/**
|
||||||
|
|
||||||
|
# regras gerais
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.sublime-project
|
.env
|
||||||
*.sublime-workspace
|
vendor
|
||||||
app/themes
|
node_modules
|
||||||
!app/themes/*.theme
|
docker-compose.override.yml
|
||||||
!app/themes/*.theme.tgz
|
|
||||||
app/plugins
|
|
||||||
!app/themes/*.plugins
|
|
||||||
!app/themes/*.plugins.tgz
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
# wordpress-stack
|
# wordpress-stack
|
||||||
|
|
||||||
Setup baseado em containers servindo Wordpress via FastCGI (php-fpm) e nginx como webproxy.
|
Site WP para Hackeamos.Org
|
||||||
+14
-5
@@ -2,8 +2,17 @@
|
|||||||
"name": "hackeamos-org/wp-project",
|
"name": "hackeamos-org/wp-project",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.1",
|
"php": ">=8.1"
|
||||||
"wpackagist-theme/twentytwentyfive": "*"
|
},
|
||||||
|
"scripts": {
|
||||||
|
"post-install-cmd": [
|
||||||
|
"./scripts/composer-loop.sh ./webroot/wp-content/themes install",
|
||||||
|
"./scripts/composer-loop.sh ./webroot/wp-content/plugins install"
|
||||||
|
],
|
||||||
|
"post-update-cmd": [
|
||||||
|
"./scripts/composer-loop.sh ./webroot/wp-content/themes update",
|
||||||
|
"./scripts/composer-loop.sh ./webroot/wp-content/plugins update"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"repositories": [
|
"repositories": [
|
||||||
{
|
{
|
||||||
@@ -16,13 +25,13 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"extra": {
|
"extra": {
|
||||||
"wordpress-install-dir": "app",
|
"wordpress-install-dir": "webroot",
|
||||||
"installer-paths": {
|
"installer-paths": {
|
||||||
"app/plugins/{$name}/": [
|
"webroot/plugins/{$name}/": [
|
||||||
"type:wordpress-plugin",
|
"type:wordpress-plugin",
|
||||||
"type:wpackagist-plugin"
|
"type:wpackagist-plugin"
|
||||||
],
|
],
|
||||||
"app/themes/{$name}/": [
|
"webroot/themes/{$name}/": [
|
||||||
"type:wordpress-theme",
|
"type:wordpress-theme",
|
||||||
"type:wpackagist-theme"
|
"type:wpackagist-theme"
|
||||||
]
|
]
|
||||||
|
|||||||
Generated
+20
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"_readme": [
|
||||||
|
"This file locks the dependencies of your project to a known state",
|
||||||
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
|
"This file is @generated automatically"
|
||||||
|
],
|
||||||
|
"content-hash": "096c338104c6d323cd61176fe27bfa51",
|
||||||
|
"packages": [],
|
||||||
|
"packages-dev": [],
|
||||||
|
"aliases": [],
|
||||||
|
"minimum-stability": "stable",
|
||||||
|
"stability-flags": {},
|
||||||
|
"prefer-stable": false,
|
||||||
|
"prefer-lowest": false,
|
||||||
|
"platform": {
|
||||||
|
"php": ">=8.1"
|
||||||
|
},
|
||||||
|
"platform-dev": {},
|
||||||
|
"plugin-api-version": "2.9.0"
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#
|
||||||
|
# uncoment volumes below to bind specif plugins and themes from other paths into your project
|
||||||
|
# copy this file as 'docker-compose.override.yml' for autoloading with docker-compose.yml
|
||||||
|
#
|
||||||
|
services:
|
||||||
|
|
||||||
|
reverse-proxy:
|
||||||
|
# volumes:
|
||||||
|
# - ../repo/wp-content/themes/my-theme:/var/www/html/wp-content/themes/my-theme
|
||||||
|
# - ../repo/wp-content/plugins/my-plugin:/var/www/html/wp-content/plugins/my-plugin
|
||||||
|
|
||||||
|
app:
|
||||||
|
# volumes:
|
||||||
|
# - ../repo/wp-content/themes/my-theme:/var/www/html/wp-content/themes/my-theme
|
||||||
|
# - ../repo/wp-content/plugins/my-plugin:/var/www/html/wp-content/plugins/my-plugin
|
||||||
+7
-9
@@ -3,14 +3,14 @@ name: ${WPSTACK_PROJECT_NAME:-wpstack}
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
reverse-proxy:
|
reverse-proxy:
|
||||||
container_name: reverse-proxy
|
container_name: ${WPSTACK_PROJECT_NAME:-wpstack}-reverse-proxy
|
||||||
image: hackeamos/httpd
|
image: hackeamos/httpd
|
||||||
build:
|
build:
|
||||||
context: './docker/nginx'
|
context: './docker/nginx'
|
||||||
depends_on:
|
depends_on:
|
||||||
- app
|
- app
|
||||||
volumes:
|
volumes:
|
||||||
- webroot:/var/www/html
|
- ./webroot:/var/www/html
|
||||||
environment:
|
environment:
|
||||||
WORDPRESS_SITEURL: ${WPSTACK_PROTOCOL}://${WPSTACK_DOMAIN}/${WPSTACK_URLPATH:-}
|
WORDPRESS_SITEURL: ${WPSTACK_PROTOCOL}://${WPSTACK_DOMAIN}/${WPSTACK_URLPATH:-}
|
||||||
WORDPRESS_SITE_TYPE: ${WPSTACK_MULTISITE:-regular}
|
WORDPRESS_SITE_TYPE: ${WPSTACK_MULTISITE:-regular}
|
||||||
@@ -23,21 +23,19 @@ services:
|
|||||||
- proxy-network
|
- proxy-network
|
||||||
|
|
||||||
app:
|
app:
|
||||||
container_name: app
|
container_name: ${WPSTACK_PROJECT_NAME:-wpstack}-app
|
||||||
image: hackeamos/wp
|
image: hackeamos/wp
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./docker/wordpress/Dockerfile
|
dockerfile: ./docker/wordpress/Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- webroot:/var/www/html
|
- ./webroot:/var/www/html
|
||||||
- ./app/themes:/var/www/html/wp-content/themes
|
|
||||||
- ./app/plugins:/var/www/html/wp-content/plugins
|
|
||||||
- ./app/mu-plugins:/var/www/html/wp-content/mu-plugins
|
|
||||||
environment:
|
environment:
|
||||||
WORDPRESS_DB_HOST: db
|
WORDPRESS_DB_HOST: db
|
||||||
WORDPRESS_DB_USER: ${DB_USER}
|
WORDPRESS_DB_USER: ${DB_USER}
|
||||||
WORDPRESS_DB_NAME: ${DB_NAME}
|
WORDPRESS_DB_NAME: ${DB_NAME}
|
||||||
WORDPRESS_DB_PASSWORD: ${DB_PASS}
|
WORDPRESS_DB_PASSWORD: ${DB_PASS}
|
||||||
|
WORDPRESS_TABLE_PREFIX: ${DB_PREFIX:-wp_}
|
||||||
WORDPRESS_SITEURL: ${WPSTACK_PROTOCOL}://${WPSTACK_DOMAIN}/${WPSTACK_URLPATH:-}
|
WORDPRESS_SITEURL: ${WPSTACK_PROTOCOL}://${WPSTACK_DOMAIN}/${WPSTACK_URLPATH:-}
|
||||||
WORDPRESS_BLOGNAME: ${WPSTACK_BLOGNAME:-}
|
WORDPRESS_BLOGNAME: ${WPSTACK_BLOGNAME:-}
|
||||||
WORDPRESS_ADMIN_USER: ${WPSTACK_ADMIN_USER:-admin}
|
WORDPRESS_ADMIN_USER: ${WPSTACK_ADMIN_USER:-admin}
|
||||||
@@ -54,10 +52,11 @@ services:
|
|||||||
- proxy-network
|
- proxy-network
|
||||||
|
|
||||||
db:
|
db:
|
||||||
container_name: db
|
container_name: ${WPSTACK_PROJECT_NAME:-wpstack}-db
|
||||||
image: mariadb
|
image: mariadb
|
||||||
volumes:
|
volumes:
|
||||||
- db_data:/var/lib/mysql
|
- db_data:/var/lib/mysql
|
||||||
|
- ../db:/docker-entrypoint-initdb.d
|
||||||
environment:
|
environment:
|
||||||
MARIADB_RANDOM_ROOT_PASSWORD: true
|
MARIADB_RANDOM_ROOT_PASSWORD: true
|
||||||
MARIADB_USER: ${DB_USER}
|
MARIADB_USER: ${DB_USER}
|
||||||
@@ -68,7 +67,6 @@ services:
|
|||||||
- proxy-network
|
- proxy-network
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
webroot:
|
|
||||||
db_data:
|
db_data:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ FROM wordpress:${WP_VERSION}-php${PHP_VERSION}-fpm-alpine
|
|||||||
|
|
||||||
# clean core from default themes and plugins
|
# clean core from default themes and plugins
|
||||||
RUN rm -rf /usr/src/wordpress/wp-content/themes/* && rm -rf /usr/src/wordpress/wp-content/plugins/*
|
RUN rm -rf /usr/src/wordpress/wp-content/themes/* && rm -rf /usr/src/wordpress/wp-content/plugins/*
|
||||||
COPY app/* /usr/src/wordpress
|
|
||||||
|
|
||||||
# install system dependencies
|
# install system dependencies
|
||||||
RUN apk add --no-cache msmtp mysql-client;
|
RUN apk add --no-cache msmtp mysql-client;
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ if which wp && ! wp core is-installed; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$(wp theme list --format=count)" = "0"; then
|
if test "$(wp theme list --format=count)" = "0"; then
|
||||||
wp theme install ${WORDPRESS_DEFAULT_THEME:-twentytwentysix} --force --activate;
|
wp theme install ${WORDPRESS_DEFAULT_THEME:-twentytwentyfive} --force --activate;
|
||||||
fi
|
fi
|
||||||
Generated
+20531
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"name": "hackeamos.org",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"description": "Site WP para Hackeamos.Org",
|
||||||
|
"keywords": [
|
||||||
|
"hackeamos.org",
|
||||||
|
"wordpress"
|
||||||
|
],
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git@git.hackeamos.org:Hackeamos.Org/hms-wordpress.git"
|
||||||
|
},
|
||||||
|
"workspaces": [
|
||||||
|
"webroot/wp-content/themes/hms-themes",
|
||||||
|
"webroot/wp-content/plugins/plotar"
|
||||||
|
],
|
||||||
|
"license": "GPL-3.0-or-later",
|
||||||
|
"author": "Hackeamos.Org",
|
||||||
|
"scripts": {
|
||||||
|
"build": "npm run build --workspaces --if-present",
|
||||||
|
"start": "npm run start --workspaces --if-present; npm run watch --workspaces --if-present",
|
||||||
|
"watch": "npm run start --workspaces --if-present; npm run watch --workspaces --if-present"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ WPSTACK_ADMIN_EMAIL=contato@example.com # use a valid email
|
|||||||
WPSTACK_PROTOCOL=https
|
WPSTACK_PROTOCOL=https
|
||||||
WPSTACK_DOMAIN=localhost
|
WPSTACK_DOMAIN=localhost
|
||||||
WPSTACK_BLOGNAME=My WP Site
|
WPSTACK_BLOGNAME=My WP Site
|
||||||
|
WPSTACK_BLOGDESCRIPTION=My Wordpress Site by WP-Stack
|
||||||
SMTP_HOST=mailpit
|
SMTP_HOST=mailpit
|
||||||
SMTP_PORT=1025
|
SMTP_PORT=1025
|
||||||
SMTP_AUTH=off
|
SMTP_AUTH=off
|
||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
base_path="${1}";
|
||||||
|
command="${2}";
|
||||||
|
|
||||||
|
for item in $base_path/*; do
|
||||||
|
if test ! -d $item; then
|
||||||
|
#echo "\"${item}\" is not a directory";
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test ! -f "${item}/composer.json"; then
|
||||||
|
#echo "\"${item}\" is not a composer package";
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ${item};
|
||||||
|
composer ${command};
|
||||||
|
cd -;
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user