Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
0283e37
Bring in customized docker4drupal resources and new base
Dec 6, 2024
b3f3d15
Correct pece-distro folder name for build
Dec 6, 2024
e3f1c55
Add missing drupal version env var to get setting files initialized
Dec 6, 2024
2834534
Add permission reset for test acme storage
Dec 6, 2024
5813c9b
Remove unneeded/incorrect entries
Dec 6, 2024
e5456f2
Correct traefik using the correct network (fix timeout issue)
Dec 6, 2024
419ba48
Use wodby /mnt structure for bind mounts
Dec 6, 2024
1520508
Correct domain specification for tls and reduce logging
Dec 6, 2024
bb28afe
Reduce PHP errors (potential for spilling config)
Dec 6, 2024
2e64e0e
Adjust files/private bind mounts
Dec 6, 2024
4ab3f1a
Enable trusted host pattern population
Dec 6, 2024
1543306
Add more wodby-controlled settings - drupal site
Dec 6, 2024
c97de20
Note options for use of WODBY_HOSTS
Dec 6, 2024
a24315e
Make acme files via make, improve push/tag/etc for image
Dec 6, 2024
55c66c2
Supply additional php container defaults
Dec 6, 2024
23a028e
Remove acme files
Dec 6, 2024
daa5ba1
Resolve hash inline with tagging
Dec 7, 2024
2f9f4b8
Build/php improvements
Dec 7, 2024
ebeef12
Push everything for now
Dec 7, 2024
0ded662
Fix: ensure use of regex pattern to reach site over TLS
Dec 7, 2024
5e768d6
Update documentation for including settings
Dec 10, 2024
d6708f5
Additional notes for configuration
Dec 10, 2024
125e907
Remove unused gitignore
Dec 10, 2024
2342dc7
Specify only user - including group wipes out additional groups user …
Dec 10, 2024
bad25ed
Add override of wodby settings file with additional options
Dec 10, 2024
e9e0445
Change preferences for shell command
Dec 10, 2024
4ea884f
Remove FPM user - runs as www-data by default
Dec 10, 2024
2bbe440
Add backup folder to easily copy things out of container
Dec 10, 2024
24dc124
Add and configure ssh container
Dec 10, 2024
2598084
Change cron tab to mount
Dec 10, 2024
b3eb6eb
Disable php error display
Dec 10, 2024
7e2a9b5
Add capability to specify site logo
Dec 10, 2024
dea6f9a
Provide capability to specify common PHP settings
Dec 10, 2024
ba71f96
Add capability to specify theme option: display site name
Dec 10, 2024
4c05af1
Fix incorrect specification of site name
Dec 10, 2024
7a68b1d
Add default solr configuration for Drupal
Dec 20, 2024
a370f77
Move solr configuration setup to make command
Dec 20, 2024
a46a134
Correct working directory context for build
Dec 21, 2024
6bf34c2
Add solr/redis and clean up compose files
Dec 21, 2024
77fc33a
Add prepare make step for files owned by alternate users
Dec 21, 2024
8c5250f
Update items for solr folder
Dec 21, 2024
083c4b3
Update env sample to match current requirements
Dec 21, 2024
193396e
Add build version tag
Jan 10, 2025
bd7510a
Add (temporary) fix for NGINX not knowing what an mjs file is
Jan 10, 2025
37c100d
Add support for additional options: TLS_ENABLE, PROJECT_PORT_TLS, SSH…
Mar 8, 2025
9543585
Use sensible (opinionated) make defaults
Mar 8, 2025
bbf374e
Ensure that make update performs a prune operation
Mar 8, 2025
3c2c3ee
Fix make build using the incorrect git hash for tagging
Mar 8, 2025
e689248
Minor feedback and documentation updates
Mar 8, 2025
bdb0937
Ignore the config and private folders
Mar 8, 2025
48a6440
BREAKING CHANGE: Update solr config/make file
Mar 11, 2025
cae9772
Add current solr config zip
Mar 11, 2025
a31230b
Correct URL pattern and env examples
Mar 19, 2025
f74de1b
Add traefik options and logging and unify compose file list
Mar 19, 2025
e53f0ad
git ignore log files
Mar 19, 2025
5386ea3
Add additional files for traefik configuration
Mar 19, 2025
9f5d1f5
git ignore actual logs files
Mar 19, 2025
611710f
Add make check command to see combined compose file contents
Mar 19, 2025
eb708db
Add variables for cron container
Mar 19, 2025
5831c15
Correct definition for backend network
Mar 19, 2025
349bebb
Update solr configuration
Mar 19, 2025
9474f55
Ensure all containers restart
Apr 4, 2025
6438a8e
Enable capture of source IP and limiting source IP addresses
Apr 5, 2025
857693a
Correct Cloudflare IP list
Apr 5, 2025
6b65a1a
Set CF source IP header using wodby variable
Apr 5, 2025
db826dc
Simplify rate limit rule addition
Apr 5, 2025
0d72d0e
Correct real IP lookup/assignment for nginx
Apr 5, 2025
7eac4c9
Add AI bot distrations
Apr 7, 2025
03494d7
Remove previous workaround for mime type handling
Apr 9, 2025
1b28a11
Add IOCAINE_SEED to enable more stable generation
Apr 11, 2025
b0777f2
Add additional books for IOCAINE
Apr 11, 2025
214b59a
Add compare option for make to simplify finding .env updates
Apr 11, 2025
9d277a6
Ensure strings are quoted
Apr 11, 2025
790aaf9
Solr 9.8.0 presented issues loading the core - rollback to 9.7.0 for now
Apr 11, 2025
c35a644
Add additional books for IOCAINE
Apr 11, 2025
d37dbf4
Add an example for traefik log rotation
Apr 11, 2025
3a72b6b
Add reading redis setting from .env
Apr 16, 2025
c7c6add
Update README
May 6, 2025
484a7f5
Correct example for traefik unfiltered rule
May 10, 2025
b04f9fe
Add missing step for initial setup
May 10, 2025
c7d68c3
Add file permission assignment script
May 11, 2025
4549a3b
Add support for slow log
May 29, 2025
ea7dcc5
Do not make the backend completely isolated
May 29, 2025
efc941f
Add template with additional fields for msmtp
May 30, 2025
fdc3af8
Ensure the FROM and the envelope from are matching
May 30, 2025
26b8603
Just override the template (rather than require image rebuild)
May 31, 2025
b8cc3b5
Fix string setting quoting (mail from)
May 31, 2025
7737094
Relocate REGISTRY and BUILD_VERSION vars
Aug 5, 2025
53ff329
Update tag for pece-drupal version
Aug 11, 2025
f3a15fc
Add docker logging configuration and resources notes
Aug 29, 2025
ee331ea
Add down to make commands
Sep 24, 2025
e1aede6
Remove UID/GID for build - everything is assigned to wodby user regar…
Oct 22, 2025
4fbc2a7
Add deployment notes
Oct 22, 2025
9a9435a
Ensure other php containers use latest tag
Oct 22, 2025
a248696
Document full upgrade command list
Oct 22, 2025
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
214 changes: 163 additions & 51 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,97 +1,209 @@
#
# Copy and rename this file to .env at root of this project.
#

# A common use case is to supply database creds via the environment. Edit settings.php
# like so:
#
# $databases['default']['default'] = [
# 'database' => getenv('DB_NAME'),
# 'driver' => 'mysql',
# 'host' => getenv('DB_HOST'),
# 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
# 'password' => getenv('drupal'),
# 'port' => getenv('DB_PORT'),
# 'prefix' => '',
# 'username' => getenv('DB_USER'),
# ];
# Add the following near the bottom of your settings.php file to load the settings passed
# into the containers:
#
# if (file_exists('/var/www/conf/wodby.settings.php')) {
# include '/var/www/conf/wodby.settings.php';
# }
# If pulling/pushing from elsewhere than the pece-distro github repo:
REGISTRY="git.example.com/organization"
BUILD_VERSION="0.0.2"

# Another common use case is to set Drush's --uri via environment.
DRUSH_OPTIONS_URI=http://pece.example.com

# Also set a unique hash:
DRUPAL_HASH_SALT='S@lt1sGre@tButN0t4Sn@1lz' # Use a real salt here
# Currently supported Drupal major version. This is required to initialize included settings files
# see also: NGINX_VHOST_PRESET in the NGINX settings
DRUPAL_VERSION=10
# Also needed for wodby to set up configuration properly (currently, only 'default' is supported):
DRUPAL_SITE=default
# Relative to the current folder (or absolute), custom configuration:
#DRUPAL_CONFIG_SYNC_DIR="./docker/config"
# Or, leave empty to use default configuration from the distribution:
DRUPAL_CONFIG_SYNC_DIR=
### Documentation available at https://wodby.com/docs/stacks/drupal/local
### Changelog can be found at https://github.com/wodby/docker4drupal/releases
### Images tags format explained at https://github.com/wodby/docker4drupal#images-tags

### PROJECT SETTINGS

# Determines the docker container names:
PROJECT_NAME=my_pece_project

# Descriptive name used on site
# Setting these to nothing and using configuration is preferred, but these can override config
SITE_NAME="PECE ROCKS"
SITE_LOGO_FILE='public://my-logo.png'
SITE_USE_SITE_NAME=FALSE

# Domain names
PROJECT_BASE_URL=pece.example.com
## Put here your fork link here or use this PECE distro
PROJECT_GIT=https://github.com/PECE-project/pece-distro.git
PROJECT_SAN_URL=www.pece.example.com

# URL pattern used by traefik route
PROJECT_URL_PATTERN="^(www\.)?pece\.example\.com$"
# automatically assembled in compose.yml by default (from url+san)
# If you have more than two DNS names, update the traefik labels in
# For example:
# For NGINX labels in compose.ssl.yml
#- "traefik.http.routers.${PROJECT_NAME}_nginx-secure.tls.domains[0].main=first.example.com"
# - "traefik.http.routers.${PROJECT_NAME}_nginx-secure.tls.domains[0].sans=[second.example.com, third.example.com]"
# For PHP environment settings in compose.yml
# Enter all host name options in an array in json format:
# WODBY_HOSTS=["first.example.com" "second.example.com" "third.example.com"]

## Put your fork link here or use this PECE distro
PROJECT_GIT=https://github.com/PECE-project/drupal-pece.git
PROJECT_BRANCH=2.x
# => Example downloading a development version by setting a specific branch
# PROJECT_GIT=https://github.com/PECE-project/drupal-pece.git --branch=2.x

# Certificates: test || live. Ensure you get a test certificate before switching to live
# in order to prevent lockout by LetsEncrypt. When switching to live, delete the
# docker/letsencrypt/acme-test.json file.
PROJECT_PORT=80 # Use port 80 for live, but you may need something > 1024 for local testing (e.g. 8000)
# Enable TLS (SSL) support
TLS_ENABLE=yes
PROJECT_PORT_TLS=443 # Use port 443 for live, but you may need something > 1024 for local testing (e.g. 8443)
LETS_ENCRYPT_TARGET=test

# Enable IOCANE anti-bot service
IOCAINE_ENABLE=FALSE
IOCAINE_SEED=
#If e.g. you have multiple sites and want different AI generation for each, set a random seed:
#IOCAINE_SEED="mustbeanystringvalue"

# SMTP mailer settings
SMTP_ON=TRUE
SMTP_HOST=mail.example.com
SMTP_PORT=25
SMTP_PROTOCOL=standard
SMTP_AUTOTLS=TRUE
SMTP_USERNAME=smtptest
SMTP_PASSWORD=password
[email protected]
SMTP_FROMNAME="SMTP Test Account"

# SSH port for direct php container access
SSH_PORT=21
SSH_ENABLE=TRUE

### --- PHP ----
# using wodby/php (in Dockerfile, not compose.yml)
PHP_VER=8.3
PHP_MEMORY_LIMIT=256M
PHP_FPM_PM_MAX_CHILDREN=10
PHP_FPM_PM_MAX_REQUESTS=2000
PHP_FPM_REQUEST_SLOWLOG_TIMEOUT=90s
PHP_MAX_INPUT_VARS=5000
PHP_POST_MAX_SIZE=32M
PHP_UPLOAD_MAX_FILESIZE=32M

## Put here your sys admin email
SYSADMIN_MAIL=
# Use this command to create hash password, replace username and password
# echo $(htpasswd -nb username password)
# If htpasswd command is not available you can use the anternative below
# printf "<username_here>:$(openssl passwd -5 <password_here>)\n"
TRAEFIK_ACCESS_HASH=

# admin:test
# Note, password protection does not currently function. Only enable the dashboard for testing.
TRAEFIK_DASH_ENABLE=false
TRAEFIK_ACCESS_HASH='admin:$5$CF7jWr0NxTEcg4/v$GNfwPDvivpY7cueLHIYalEKjtdeIKe/WrP8iKp9CAc9'
CLOUDFLARE_IPS="173.245.48.0/20, 103.21.244.0/22, 103.22.200.0/22, 103.31.4.0/22, 141.101.64.0/18, 108.162.192.0/18, 190.93.240.0/20, 188.114.96.0/20, 197.234.240.0/22, 198.41.128.0/17, 162.158.0.0/15, 104.16.0.0/13, 104.24.0.0/14, 172.64.0.0/13, 131.0.72.0/22, 2400:cb00::/32, 2606:4700::/32, 2803:f800::/32, 2405:b500::/32, 2405:8100::/32, 2a06:98c0::/29, 2c0f:f248::/32"
#No limits:
#TRAEFIK_TRUSTED_IPS="0.0.0.0/0, 0::/0"
#Only allow traffic from CloudFlare:
TRAEFIK_TRUSTED_IPS=$CLOUDFLARE_IPS
DB_NAME=pece
DB_USER=pece
DB_PASSWORD=pece
DB_ROOT_PASSWORD=password
DB_HOST=mariadb
DB_DRIVER=mysql
DB_PORT=3306
DB_DRIVER=mysql

### --- MARIADB ----

MARIADB_TAG=11-3.30.0
#MARIADB_TAG=10.4-3.9.4
### --- TRAEFIK --
TRAEFIK_TAG="v3.3"

### --- VANILLA DRUPAL ----
### --- SOLR ---
# NOTE: using bitnami/solr (not wodby/solr)
SOLR_TAG=9.7.0
SOLR_CORES=drupal

DRUPAL_TAG=8.2
#DRUPAL_TAG=8.1
### --- VALKEY ---
# using wodby/valkey (as 'redis')
VALKEY_TAG=8.0-1.0.0
# From the php side, it's called redis
# Be sure to set to empty when you are first installing
REDIS_HOST=redis

### --- PHP ----
### --- MARIADB ----
# using wodby/mariadb
MARIADB_TAG=11.4-3.30.5
#MARIADB_TAG=10.11-3.30.5
#MARIADB_TAG=10.6-3.30.5
#MARIADB_TAG=10.5-3.30.5

# Linux (uid 1000 gid 1000)
### --- VANILLA DRUPAL ----
#DRUPAL_TAG=11-4.77.0
#DRUPAL_TAG=10-4.77.0
#DRUPAL_TAG=7-4.77.0

PHP_TAG=8.3
#PHP_TAG=7-4.36.1

# macOS (uid 501 gid 20)

#PHP_TAG=8.3-dev-macos
#PHP_TAG=8.4-dev-macos-4.64.0
#PHP_TAG=8.3-dev-macos-4.64.0
#PHP_TAG=8.2-dev-macos-4.64.0
#PHP_TAG=8.1-dev-macos-4.64.0

### --- NGINX ----

NGINX_TAG=1.27-5.39.10
NGINX_VHOST_PRESET=drupal8
# using wodby/nginx
NGINX_TAG=1.27-5.40.2
#NGINX_TAG=1.26-5.39.12

NGINX_VHOST_PRESET=drupal10-ratelimit
NGINX_SET_REAL_IP_FROM=traefik
NGINX_REAL_IP_HEADER=CF-Connecting-IP
#NGINX_VHOST_PRESET=drupal11
#NGINX_VHOST_PRESET=drupal7

### --- SOLR ---

SOLR_CONFIG_SET="search_api_solr_8.x-2.7"
#SOLR_CONFIG_SET="search_api_solr_8.x-1.2"
#SOLR_CONFIG_SET="search_api_solr_7.x-1.14"
### --- ELASTICSEARCH ---

SOLR_TAG=7.7-4.18.2
#SOLR_TAG=7.7-3.1.1
#SOLR_TAG=7.6-3.1.1
#SOLR_TAG=7.5-3.1.1
#SOLR_TAG=6.6-3.1.1
#SOLR_TAG=5.5-3.1.1
#ELASTICSEARCH_TAG=7-5.19.11

### --- ELASTICSEARCH ---
### --- KIBANA ---

#KIBANA_TAG=7-5.19.11

### --- NODE ---

#NODE_TAG=22-dev-1.43.2
#NODE_TAG=20-dev-1.43.2
#NODE_TAG=18-dev-1.43.2

### --- VARNISH ---

#VARNISH_TAG=6.0-4.18.4

### --- POSTGRESQL ----

#POSTGRES_TAG=16-1.34.7
#POSTGRES_TAG=15-1.34.7
#POSTGRES_TAG=14-1.34.7
#POSTGRES_TAG=13-1.34.7
#POSTGRES_TAG=12-1.34.7

ELASTICSEARCH_TAG=7.17-5.19.11
#ELASTICSEARCH_TAG=6.7-4.1.2
#ELASTICSEARCH_TAG=5.6-4.1.2
### OTHERS

#ADMINER_TAG=4-3.28.0
#APACHE_TAG=2.4-4.14.7
#MEMCACHED_TAG=1-2.17.7
#OPENSMTPD_TAG=7-1.22.5
#RSYSLOG_TAG=latest
#SELENIUM_CHROME_TAG=3.141
#WEBGRIND_TAG=1-1.34.0
#XHPROF_TAG=3.11.0
#ZOOKEEPER_TAG=3.8
18 changes: 15 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
docker/database/data/
pece-distro
.env
.idea
.idea/
.vscode
docker/backup/
docker/config/
docker/crontab
docker/database/data/
docker/files/
docker/logs/
docker/private/
docker/solr/
docker/ssh/
docker/traefik/acme*.json
docker/wodby/nginx-preset.conf
mutagen.yml.lock
pece-distro/
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ARG PHP_VER=8.3
FROM wodby/drupal-php:${PHP_VER}

WORKDIR /var/www/html
COPY . .
USER root

COPY drupal10.settings.php.tmpl /etc/gotpl/

RUN ["composer", "install", "--no-dev", "--optimize-autoloader"]
RUN ["ln", "-s", "/mnt/files/public", "/var/www/html/web/sites/default/files"]
RUN ["ln", "-s", "/mnt/files/private", "/var/www/html/private"]
RUN ["chown", "-R", "wodby:wodby", "/var/www/html"]
USER wodby
RUN ["composer", "clear-cache"]
8 changes: 8 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The MIT License (MIT)
Copyright (c) 2016 Wodby, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading