Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .devilbox/www/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');


$DEVILBOX_VERSION = 'v3.0.0-beta-0.6';
$DEVILBOX_DATE = '2024-11-5';
$DEVILBOX_VERSION = 'v3.0.0';
$DEVILBOX_DATE = '2025-03-27';
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';

//
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ on:
paths:
- 'docs/**'
- '!**.md'
# Runs on master Branch and Tags
# Runs on mainline Branch and Tags
push:
paths:
- 'docs/**'
- '!**.md'
branches:
- master
- mainline


# -------------------------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ on:
# Runs on Pull Requests
pull_request:

# Runs on master Branch and Tags
# Runs on mainline Branch and Tags
push:
branches:
- master
- mainline


# -------------------------------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/params-mongo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ env:
# CI for Mongo 3.2 and 3.4 removed due to non-reproducible error in CI
MATRIX: >-
[
{"MONGO_SERVER": "Mongo 3.6"},
{"MONGO_SERVER": "Mongo 4.0"},
{"MONGO_SERVER": "Mongo 4.2"},
{"MONGO_SERVER": "Mongo 4.4"},
Expand Down
20 changes: 4 additions & 16 deletions .github/workflows/params-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,26 @@ env:
# PgSQL server versions. That's why we need to tell those combinations to use an old PgSQL server
MATRIX: >-
[
{"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "apache-2.4", "PGSQL_SERVER": "PgSQL 12", "MONGO_SERVER": "Mongo 5.0"},
{"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "apache-2.4", "PGSQL_SERVER": "PgSQL 12", "MONGO_SERVER": "Mongo 5.0"},
{"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "apache-2.4", "PGSQL_SERVER": "PgSQL 12"},
{"PHP_SERVER": "PHP 7.2", "HTTPD_SERVER": "apache-2.4"},
{"PHP_SERVER": "PHP 7.3", "HTTPD_SERVER": "apache-2.4"},
{"PHP_SERVER": "PHP 7.4", "HTTPD_SERVER": "apache-2.4"},
{"PHP_SERVER": "PHP 8.0", "HTTPD_SERVER": "apache-2.4"},
{"PHP_SERVER": "PHP 8.1", "HTTPD_SERVER": "apache-2.4"},
{"PHP_SERVER": "PHP 8.2", "HTTPD_SERVER": "apache-2.4"},
{"PHP_SERVER": "PHP 8.3", "HTTPD_SERVER": "apache-2.4"},
{"PHP_SERVER": "PHP 8.4", "HTTPD_SERVER": "apache-2.4"},

{"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "nginx-stable", "PGSQL_SERVER": "PgSQL 12", "MONGO_SERVER": "Mongo 5.0"},
{"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "nginx-stable", "PGSQL_SERVER": "PgSQL 12", "MONGO_SERVER": "Mongo 5.0"},
{"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "nginx-stable", "PGSQL_SERVER": "PgSQL 12"},
{"PHP_SERVER": "PHP 7.2", "HTTPD_SERVER": "nginx-stable"},
{"PHP_SERVER": "PHP 7.3", "HTTPD_SERVER": "nginx-stable"},
{"PHP_SERVER": "PHP 7.4", "HTTPD_SERVER": "nginx-stable"},
{"PHP_SERVER": "PHP 8.0", "HTTPD_SERVER": "nginx-stable"},
{"PHP_SERVER": "PHP 8.1", "HTTPD_SERVER": "nginx-stable"},
{"PHP_SERVER": "PHP 8.2", "HTTPD_SERVER": "nginx-stable"},
{"PHP_SERVER": "PHP 8.3", "HTTPD_SERVER": "nginx-stable"},
{"PHP_SERVER": "PHP 8.4", "HTTPD_SERVER": "nginx-stable"},

{"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "nginx-mainline", "PGSQL_SERVER": "PgSQL 12", "MONGO_SERVER": "Mongo 5.0"},
{"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "nginx-mainline", "PGSQL_SERVER": "PgSQL 12", "MONGO_SERVER": "Mongo 5.0"},
{"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "nginx-mainline", "PGSQL_SERVER": "PgSQL 12"},
{"PHP_SERVER": "PHP 7.2", "HTTPD_SERVER": "nginx-mainline"},
{"PHP_SERVER": "PHP 7.3", "HTTPD_SERVER": "nginx-mainline"},
{"PHP_SERVER": "PHP 7.4", "HTTPD_SERVER": "nginx-mainline"},
{"PHP_SERVER": "PHP 8.0", "HTTPD_SERVER": "nginx-mainline"},
{"PHP_SERVER": "PHP 8.1", "HTTPD_SERVER": "nginx-mainline"},
{"PHP_SERVER": "PHP 8.2", "HTTPD_SERVER": "nginx-mainline"},
{"PHP_SERVER": "PHP 8.3", "HTTPD_SERVER": "nginx-mainline"}
{"PHP_SERVER": "PHP 8.3", "HTTPD_SERVER": "nginx-mainline"},
{"PHP_SERVER": "PHP 8.4", "HTTPD_SERVER": "nginx-mainline"}
]


Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-httpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
- 'docker-compose.yml'
- 'env-example'
- '!**.md'
# Runs on master Branch and Tags
# Runs on mainline Branch and Tags
push:
paths:
- '.devilbox/**'
Expand All @@ -39,7 +39,7 @@ on:
- 'env-example'
- '!**.md'
branches:
- master
- mainline
tags:
- '[0-9]+.[0-9]+*'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-memcd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
- 'docker-compose.yml'
- 'env-example'
- '!**.md'
# Runs on master Branch and Tags
# Runs on mainline Branch and Tags
push:
paths:
- '.devilbox/**'
Expand All @@ -39,7 +39,7 @@ on:
- 'env-example'
- '!**.md'
branches:
- master
- mainline
tags:
- '[0-9]+.[0-9]+*'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-mongo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
- 'docker-compose.yml'
- 'env-example'
- '!**.md'
# Runs on master Branch and Tags
# Runs on mainline Branch and Tags
push:
paths:
- '.devilbox/**'
Expand All @@ -39,7 +39,7 @@ on:
- 'env-example'
- '!**.md'
branches:
- master
- mainline
tags:
- '[0-9]+.[0-9]+*'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
- 'docker-compose.yml'
- 'env-example'
- '!**.md'
# Runs on master Branch and Tags
# Runs on mainline Branch and Tags
push:
paths:
- '.devilbox/**'
Expand All @@ -39,7 +39,7 @@ on:
- 'env-example'
- '!**.md'
branches:
- master
- mainline
tags:
- '[0-9]+.[0-9]+*'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
- 'docker-compose.yml'
- 'env-example'
- '!**.md'
# Runs on master Branch and Tags
# Runs on mainline Branch and Tags
push:
paths:
- '.devilbox/**'
Expand All @@ -39,7 +39,7 @@ on:
- 'env-example'
- '!**.md'
branches:
- master
- mainline
tags:
- '[0-9]+.[0-9]+*'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
- 'docker-compose.yml'
- 'env-example'
- '!**.md'
# Runs on master Branch and Tags
# Runs on mainline Branch and Tags
push:
paths:
- '.devilbox/**'
Expand All @@ -39,7 +39,7 @@ on:
- 'env-example'
- '!**.md'
branches:
- master
- mainline
tags:
- '[0-9]+.[0-9]+*'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
- 'docker-compose.yml'
- 'env-example'
- '!**.md'
# Runs on master Branch and Tags
# Runs on mainline Branch and Tags
push:
paths:
- '.devilbox/**'
Expand All @@ -39,7 +39,7 @@ on:
- 'env-example'
- '!**.md'
branches:
- master
- mainline
tags:
- '[0-9]+.[0-9]+*'

Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/zzz-reuse-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,18 @@ jobs:
- name: "[DEBUG] Show Docker Compose version"
shell: bash
run: |
docker-compose version
# Try both the old hyphenated and new space-separated commands
docker-compose version || docker compose version || echo "Docker Compose not available via standard commands"

- name: "[SETUP] Ensure docker-compose compatibility"
shell: bash
run: |
if ! command -v docker-compose &> /dev/null && command -v docker &> /dev/null; then
echo "Creating docker-compose compatibility wrapper"
echo '#!/bin/bash
docker compose "$@"' | sudo tee /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
fi

# ------------------------------------------------------------
# Configure
Expand Down
8 changes: 4 additions & 4 deletions .tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ endif
### Pull currently setup images
###
pull: ../.env
cat "../docker-compose.yml" \
| perl -0 -pe "s/# version: '2.3'/version: '2.3'/g" \
> "../docker-compose.yml.tmp"
yes | mv -f "../docker-compose.yml.tmp" "../docker-compose.yml"
#cat "../docker-compose.yml" \
# | perl -0 -pe "s/# version: '2.3'/version: '2.3'/g" \
# > "../docker-compose.yml.tmp"
#yes | mv -f "../docker-compose.yml.tmp" "../docker-compose.yml"
@$(PWD)/scripts/compose-pull.sh


Expand Down
2 changes: 2 additions & 0 deletions .tests/devilbox-template-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
# .devilbox.yaml
# This file is used to automate the initialization of webapps for the Devilbox.
# Repository: https://github.com/devilbox-community/devilbox
#
#:-version: v1

Expand Down
16 changes: 10 additions & 6 deletions .tests/scripts/.lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ get_php_version() {

# Check php -v
>&2 printf "Fetching PHP version from php -v: "
if ! cli_version="$( run "docker-compose exec -T php php -v \
if ! cli_version="$( run "docker compose exec -T php php -v \
| grep -Eo '^PHP[[:space:]]+[0-9]+\\.[0-9]+' \
| grep -Eo '[0-9]+\\.[0-9]+'" \
"${retries}" "${root_path}" "0" )"; then
Expand Down Expand Up @@ -285,17 +285,17 @@ create_vhost_dir() {

# Clean vhost dir
cd "${DVLBOX_PATH}"
while docker-compose exec --user devilbox -T php curl -sS --fail "http://php/vhosts.php" | grep ">${vhost}<" >/dev/null; do
while docker compose exec --user devilbox -T php curl -sS --fail "http://php/vhosts.php" | grep ">${vhost}<" >/dev/null; do
echo "Deleting vhost: ${vhost}"
run "docker-compose exec --user devilbox -T php bash -c 'rm -rf /shared/httpd/${vhost} && sleep 5;'" "1" "${DVLBOX_PATH}"
run "docker compose exec --user devilbox -T php bash -c 'rm -rf /shared/httpd/${vhost} && sleep 5;'" "1" "${DVLBOX_PATH}"
done

# Create vhost dir
cd "${DVLBOX_PATH}"
while ! docker-compose exec --user devilbox -T php curl -sS --fail "http://php/vhosts.php" | grep ">${vhost}<" >/dev/null; do
while ! docker compose exec --user devilbox -T php curl -sS --fail "http://php/vhosts.php" | grep ">${vhost}<" >/dev/null; do
echo "Recreating vhost: ${vhost}"
run "docker-compose exec --user devilbox -T php bash -c 'rm -rf /shared/httpd/${vhost} && sleep 5;'" "1" "${DVLBOX_PATH}"
run "docker-compose exec --user devilbox -T php bash -c 'mkdir -p /shared/httpd/${vhost} && sleep 5;'" "1" "${DVLBOX_PATH}"
run "docker compose exec --user devilbox -T php bash -c 'rm -rf /shared/httpd/${vhost} && sleep 5;'" "1" "${DVLBOX_PATH}"
run "docker compose exec --user devilbox -T php bash -c 'mkdir -p /shared/httpd/${vhost} && sleep 5;'" "1" "${DVLBOX_PATH}"
done
echo "Vhost is present: ${vhost}"
}
Expand Down Expand Up @@ -327,7 +327,9 @@ sed_command() {
term_spinner() {
local pid=$!
local delay=0.1
# shellcheck disable=SC1003
local spinstr='|/-\'
# shellcheck disable=SC2143
while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do
local temp=${spinstr#?}
printf " [%c] " "$spinstr"
Expand All @@ -341,7 +343,9 @@ term_spinner() {
no_term_spinner() {
local pid=$!
local delay=0.1
# shellcheck disable=SC1003
local spinstr='|/-\'
# shellcheck disable=SC2143
while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do
printf "."
sleep 2
Expand Down
14 changes: 7 additions & 7 deletions .tests/scripts/compose-logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DVLBOX_PATH="$( cd "${SCRIPT_PATH}/../.." && pwd -P )"
# Pre-check
# -------------------------------------------------------------------------------------------------

if ! command -v docker-compose >/dev/null 2>&1; then
if ! command -v docker compose >/dev/null 2>&1; then
>&2 echo "Error 'docker-compose' binary not found, but required."
exit 1
fi
Expand All @@ -26,15 +26,15 @@ fi

echo
echo "# --------------------------------------------------------------------------------"
echo "# docker-compose logs"
echo "# docker compose logs"
echo "# --------------------------------------------------------------------------------"
run "docker-compose logs || true" "1" "${DVLBOX_PATH}"
run "docker compose logs || true" "1" "${DVLBOX_PATH}"

echo
echo "# --------------------------------------------------------------------------------"
echo "# docker-compose ps"
echo "# docker compose ps"
echo "# --------------------------------------------------------------------------------"
run "docker-compose ps || true" "1" "${DVLBOX_PATH}"
run "docker compose ps || true" "1" "${DVLBOX_PATH}"


echo
Expand All @@ -59,11 +59,11 @@ echo
echo "# --------------------------------------------------------------------------------"
echo "# mounts httpd"
echo "# --------------------------------------------------------------------------------"
run "docker-compose exec -T httpd ls -lap /shared/httpd/ || true" "1" "${DVLBOX_PATH}"
run "docker compose exec -T httpd ls -lap /shared/httpd/ || true" "1" "${DVLBOX_PATH}"


echo
echo "# --------------------------------------------------------------------------------"
echo "# mounts php"
echo "# --------------------------------------------------------------------------------"
run "docker-compose exec -T php ls -lap /shared/httpd/ || true" "1" "${DVLBOX_PATH}"
run "docker compose exec -T php ls -lap /shared/httpd/ || true" "1" "${DVLBOX_PATH}"
2 changes: 1 addition & 1 deletion .tests/scripts/compose-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ fi
# ENTRYPOINT
# -------------------------------------------------------------------------------------------------

run "docker-compose pull" "60" "${DVLBOX_PATH}"
run "docker compose pull" "60" "${DVLBOX_PATH}"
Loading