Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Variables
ROOT_DIR := $(shell pwd)
NEXTCLOUD_DIR := $(ROOT_DIR)/nextcloud-development
WORDPRESS_DIR := $(ROOT_DIR)/wordpress-docker
NEXTCLOUD_HTTP_PORT ?= 8082
NEXTCLOUD_BASE_URL := http://localhost:$(NEXTCLOUD_HTTP_PORT)
NEXTCLOUD_APPS_DIR := $(NEXTCLOUD_DIR)/volumes/nextcloud/apps-extra
Expand All @@ -12,7 +11,7 @@ LOCAL_GID := $(shell id -g)

# Docker Compose commands
NEXTCLOUD_COMPOSE := HTTP_PORT=$(NEXTCLOUD_HTTP_PORT) docker compose -f $(NEXTCLOUD_DIR)/docker-compose.yml
WORDPRESS_COMPOSE := docker compose -f $(WORDPRESS_DIR)/docker-compose.yml -f $(ROOT_DIR)/docker-compose.override.yml
WORDPRESS_COMPOSE := docker compose -f $(ROOT_DIR)/docker-compose.override.yml
NEXTCLOUD_OCC := $(NEXTCLOUD_COMPOSE) exec -u www-data nextcloud php occ
WORDPRESS_CLI := $(WORDPRESS_COMPOSE) exec wordpress wp --allow-root

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ make down
make help # View all available commands
```

If you want to run Docker Compose directly from the repository root:

```bash
docker compose -f docker-compose.override.yml up -d
docker compose -f docker-compose.override.yml down
```

## Integration Flow

WordPress is the customer-facing commerce and account portal (plans, subscriptions, invoices, payments, and account reports).
Expand Down
54 changes: 44 additions & 10 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
services:
wordpress:
image: ghcr.io/librecodecoop/wordpress-docker:latest
restart: unless-stopped
volumes:
- ./wordpress-docker/volumes/wordpress:/var/www/html
environment:
PROD_SITE_URL: https://account.libresign.coop
LOCAL_SITE_URL: http://localhost
NEXTCLOUD_LOCAL_URL: ${NEXTCLOUD_LOCAL_URL:-http://host.docker.internal:8082}
WORDPRESS_LOCAL_USERS_PASSWORD: ${WORDPRESS_LOCAL_USERS_PASSWORD:-localdev123}
WORDPRESS_LOCAL_RESET_ALL_USERS_PASSWORDS: ${WORDPRESS_LOCAL_RESET_ALL_USERS_PASSWORDS:-1}
WORDPRESS_LOCAL_RESET_PASSWORD_FOR_USER: ${WORDPRESS_LOCAL_RESET_PASSWORD_FOR_USER:-}
WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST:-mariadb}
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME:-wordpress}
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER:-root}
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD:-root}
WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX:-wp_}
WORDPRESS_SETUP_CONFIG_YAML: |
wordpress_org_plugins:
- advanced-custom-fields
Expand Down Expand Up @@ -43,7 +46,7 @@ services:
- slug: woocommerce-nextcloud-admin-group-manager
source: https://github.com/LibreSign/woocommerce-nextcloud-admin-group-manager.git
post_install_commands:
- wp option update nextcloud_api_host $$NEXTCLOUD_LOCAL_URL
- wp option update nextcloud_api_host ${NEXTCLOUD_LOCAL_URL:-http://host.docker.internal:8082}
- wp option update nextcloud_api_login ${NEXTCLOUD_ADMIN_USER:-admin}
- wp option update nextcloud_api_password ${NEXTCLOUD_ADMIN_PASSWORD:-admin}
- slug: woocommerce-restrict-switch
Expand All @@ -53,15 +56,46 @@ services:
wordpress_custom_themes:
- slug: libresign
source: https://github.com/LibreSign/wordpress-theme.git
WORDPRESS_LOCAL_USERS_PASSWORD: ${WORDPRESS_LOCAL_USERS_PASSWORD:-admin}
WORDPRESS_LOCAL_RESET_ALL_USERS_PASSWORDS: ${WORDPRESS_LOCAL_RESET_ALL_USERS_PASSWORDS:-1}
WORDPRESS_LOCAL_RESET_PASSWORD_FOR_USER: ${WORDPRESS_LOCAL_RESET_PASSWORD_FOR_USER:-}
PROD_SITE_URL: ${PROD_SITE_URL:-https://account.libresign.coop}
LOCAL_SITE_URL: ${LOCAL_SITE_URL:-http://localhost}
NEXTCLOUD_LOCAL_URL: ${NEXTCLOUD_LOCAL_URL:-http://host.docker.internal:8082}
XDEBUG_CONFIG: ${XDEBUG_CONFIG:-client_host=host.docker.internal start_with_request=yes}
XDEBUG_MODE: ${XDEBUG_MODE:-off}
HOST_UID: ${HOST_UID:-1000}
HOST_GID: ${HOST_GID:-1000}
extra_hosts:
- "host.docker.internal:host-gateway"

nginx:
image: nginx
restart: unless-stopped
volumes:
- ./wordpress-docker/volumes/wordpress:/var/www/html:ro
- ./wordpress-docker/.docker/nginx/conf.d/:/etc/nginx/conf.d/
environment:
- DEFAULT_HOST
- VIRTUAL_HOST
- LETSENCRYPT_HOST
- LETSENCRYPT_EMAIL
ports:
- "80:80"

mariadb:
extends:
file: common-services.yml
service: mariadb
build:
context: ./wordpress-docker/.docker/mariadb
volumes:
- ./wordpress-docker/volumes/mariadb/dump:/docker-entrypoint-initdb.d
- ./wordpress-docker/volumes/mariadb/data:/var/lib/mysql
restart: always
environment:
- TZ=${TZ:-America/Sao_Paulo}
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD:-root}
- MARIADB_DATABASE=${MARIADB_DATABASE:-wordpress}
- MARIADB_USER=${MARIADB_USER:-wordpress}
- MARIADB_PASSWORD=${MARIADB_PASSWORD:-wordpress}

mailpit:
image: axllent/mailpit:latest
Expand Down
2 changes: 1 addition & 1 deletion wordpress-docker
Submodule wordpress-docker updated 1 files
+1 −1 README.md