Skip to content
Open
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: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
**Big Changes:**
* Traefik has been updated from v2 to v3. For compatibility, we have kept the v2 rule engine as the default. It is possible to opt-in to v3 rule syntax on a per-router basis.

**Enhancements:**
* Added Maho environment type ([#941](https://github.com/wardenenv/warden/pull/941) by @fballiano)

**Security Fixes:**
* Fix arbitrary command execution via project `.env` files. The previous loader used `eval "$(grep ...)"` against any project's `.env`, allowing shell metacharacters (e.g. `$(...)` or backticks) inside `WARDEN_*`, `TRAEFIK_*` or `PHP_*` values to execute on the developer's host whenever `warden env *` was run. Replaced with a strict KEY=VALUE parser that validates identifiers and never evaluates values. (by @lbajsarowicz)

Expand Down
4 changes: 4 additions & 0 deletions commands/env-init.help
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ WARDEN_USAGE=$(cat <<EOF
magento1 Nginx, php-fpm, db (mariadb), and redis services
pre-configured for running Magento 1

maho Nginx, php-fpm, and db (mariadb) services pre-configured
for running Maho; no redis, varnish or elasticsearch as
Maho requires none of them

symfony Nginx, php-fpm, db (mariadb), and redis services
pre-configured for running Symfony 4+
Due to the fact that Symfony uses '.env' file too,
Expand Down
12 changes: 12 additions & 0 deletions environments/maho/db.base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
db:
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-maho}
- MYSQL_DATABASE=${MYSQL_DATABASE:-maho}
- MYSQL_USER=${MYSQL_USER:-maho}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-maho}
command:
- mysqld
- --max_allowed_packet=1024M
- --explicit_defaults_for_timestamp=on
- --transaction-isolation=READ-COMMITTED
27 changes: 27 additions & 0 deletions environments/maho/init.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
DB_DISTRIBUTION=mariadb
DB_DISTRIBUTION_VERSION=12.2
NODE_VERSION=24
COMPOSER_VERSION=2
PHP_VERSION=8.5
PHP_XDEBUG_3=1

WARDEN_DB=1
WARDEN_RABBITMQ=0
WARDEN_REDIS=0

WARDEN_ELASTICSEARCH=0
WARDEN_ELASTICHQ=0
WARDEN_OPENSEARCH=0
WARDEN_VARNISH=0

WARDEN_SYNC_IGNORE=

WARDEN_ALLURE=0
WARDEN_SELENIUM=0
WARDEN_SELENIUM_DEBUG=0
WARDEN_BLACKFIRE=0

BLACKFIRE_CLIENT_ID=
BLACKFIRE_CLIENT_TOKEN=
BLACKFIRE_SERVER_ID=
BLACKFIRE_SERVER_TOKEN=
13 changes: 13 additions & 0 deletions environments/maho/maho.base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
services:
nginx:
environment:
- NGINX_PUBLIC=/public
- NGINX_TEMPLATE=maho.conf

php-fpm:
environment:
- MAGE_IS_DEVELOPER_MODE=1

php-debug:
environment:
- MAGE_IS_DEVELOPER_MODE=1
11 changes: 11 additions & 0 deletions environments/maho/maho.darwin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

x-volumes: &volumes
- appdata:/var/www/html

services:
nginx: { volumes: *volumes }
php-fpm: { volumes: *volumes }
php-debug: { volumes: *volumes }

volumes:
appdata:
26 changes: 26 additions & 0 deletions environments/maho/maho.mutagen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
sync:
defaults:
mode: two-way-resolved
watch:
pollingInterval: 10
ignore:
vcs: true
paths:
# Root .git folder
- "/.git/"

# System files
- ".DS_Store"
- "._*"

# Vim files
- "*~"
- "*.sw[a-p]"

# Maho files (cache, logs, sessions, locks)
- "/var/**"

permissions:
defaultFileMode: "0644"
defaultDirectoryMode: "0755"