Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
john-ea committed Apr 22, 2024
1 parent 286898b commit 9997f7a
Show file tree
Hide file tree
Showing 9 changed files with 198 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .devilbox/www/include/lib/container/BaseClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function setConnectError($error)
*/
public function setConnectErrno($errno)
{
$this->_connect_erro = $errno;
$this->_connect_errno = $errno;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions .devilbox/www/include/lib/container/Httpd.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ public function getVhostBackend($vhost)
$cont = stream_get_contents($fp);
fclose($fp);

$semicolon_pos = strpos($cont, ';');
if($semicolon_pos !== false && $semicolon_pos == 0) {
return 'default';
}

// conf:<type>:<proto>:<server>:<port>
$arr = explode(':', $cont);

Expand Down
137 changes: 68 additions & 69 deletions README.md

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions compose/docker-compose.override.yml-buggregator
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# vim: set ft=yaml:
---
version: '2.3'

services:

# -----------------------------------------------------------------------------------------------
# Buggregator
# -----------------------------------------------------------------------------------------------
buggregator:
image: ghcr.io/buggregator/server:latest
ports:
- 23517:8000
#- 8000:8000
- 1025:1025 # smtp
- 9912:9912 # var-dumper
- 9913:9913 # monolog
environment:
- DB_CONNECTION=mysql
- DB_HOST=mysql
- VAR_DUMPER_FORMAT=server
- VAR_DUMPER_SERVER=buggregator:9912
- RAY_HOST=buggregator
- RAY_PORT=8000
networks:
- app_net
# depends_on:
# - mysql
23 changes: 23 additions & 0 deletions compose/docker-compose.override.yml-mailpit
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# vim: set ft=yaml:
---
version: '2.3'

services:

# -----------------------------------------------------------------------------------------------
# Mailpit
# -----------------------------------------------------------------------------------------------
mailpit:
image: axllent/mailpit:${MAILPIT_SERVER:-latest}
hostname: mailpit
restart: unless-stopped
ports:
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MAILPIT:-8025}:8025"
- "${LOCAL_LISTEN_ADDR}${SMTP_PORT_MAILPIT:-1025}:1025"
networks:
app_net:
ipv4_address: 172.16.238.201
depends_on:
- bind
- php
- httpd
63 changes: 53 additions & 10 deletions compose/docker-compose.override.yml-php-multi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ services:

php56:
<<: *default-php
image: johnea/php-fpm:5.6-prod
image: johnea/php-fpm:5.6-slim-0.152
hostname: php56
networks:
app_net:
ipv4_address: 172.16.238.203
environment:
# Enable 127.0.0.1 Port-forwarding
- FORWARD_PORTS_TO_LOCALHOST=80:httpd:80,443:httpd:443,3306:mysql:3306,5432:pgsql:5432,6379:redis:6379,11211:memcd:11211,27017:mongo:27017
volumes:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-5.6:/etc/php-custom.d:ro${MOUNT_OPTIONS}
Expand All @@ -49,10 +52,14 @@ services:
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
# Mount devilbox user-defined bash config
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
# Mount DB Backup directory
- ${HOST_PATH_BACKUPDIR:-./backups}:/shared/backups:rw${MOUNT_OPTIONS}

php70:
<<: *default-php
image: johnea/php-fpm:7.0-prod
image: johnea/php-fpm:7.0-slim-0.152
hostname: php70
networks:
app_net:
Expand All @@ -67,10 +74,14 @@ services:
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
# Mount devilbox user-defined bash config
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
# Mount DB Backup directory
- ${HOST_PATH_BACKUPDIR:-./backups}:/shared/backups:rw${MOUNT_OPTIONS}

php71:
<<: *default-php
image: johnea/php-fpm:7.1-prod
image: johnea/php-fpm:7.1-slim-0.152
hostname: php71
networks:
app_net:
Expand All @@ -85,10 +96,14 @@ services:
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
# Mount devilbox user-defined bash config
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
# Mount DB Backup directory
- ${HOST_PATH_BACKUPDIR:-./backups}:/shared/backups:rw${MOUNT_OPTIONS}

php72:
<<: *default-php
image: johnea/php-fpm:7.2-prod
image: johnea/php-fpm:7.2-slim-0.152
hostname: php72
networks:
app_net:
Expand All @@ -103,10 +118,14 @@ services:
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
# Mount devilbox user-defined bash config
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
# Mount DB Backup directory
- ${HOST_PATH_BACKUPDIR:-./backups}:/shared/backups:rw${MOUNT_OPTIONS}

php73:
<<: *default-php
image: johnea/php-fpm:7.3-prod
image: johnea/php-fpm:7.3-slim-0.152
hostname: php73
networks:
app_net:
Expand All @@ -121,10 +140,14 @@ services:
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
# Mount devilbox user-defined bash config
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
# Mount DB Backup directory
- ${HOST_PATH_BACKUPDIR:-./backups}:/shared/backups:rw${MOUNT_OPTIONS}

php74:
<<: *default-php
image: johnea/php-fpm:7.4-prod
image: johnea/php-fpm:7.4-slim-0.152
hostname: php74
networks:
app_net:
Expand All @@ -139,10 +162,14 @@ services:
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
# Mount devilbox user-defined bash config
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
# Mount DB Backup directory
- ${HOST_PATH_BACKUPDIR:-./backups}:/shared/backups:rw${MOUNT_OPTIONS}

php80:
<<: *default-php
image: johnea/php-fpm:8.0-prod
image: johnea/php-fpm:8.0-slim-0.152
hostname: php80
networks:
app_net:
Expand All @@ -157,10 +184,14 @@ services:
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
# Mount devilbox user-defined bash config
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
# Mount DB Backup directory
- ${HOST_PATH_BACKUPDIR:-./backups}:/shared/backups:rw${MOUNT_OPTIONS}

php81:
<<: *default-php
image: johnea/php-fpm:8.1-prod
image: johnea/php-fpm:8.1-slim-0.152
hostname: php81
networks:
app_net:
Expand All @@ -175,10 +206,14 @@ services:
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
# Mount devilbox user-defined bash config
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
# Mount DB Backup directory
- ${HOST_PATH_BACKUPDIR:-./backups}:/shared/backups:rw${MOUNT_OPTIONS}

php82:
<<: *default-php
image: johnea/php-fpm:8.2-prod
image: johnea/php-fpm:8.2-slim-0.152
hostname: php82
networks:
app_net:
Expand All @@ -193,10 +228,14 @@ services:
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
# Mount devilbox user-defined bash config
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
# Mount DB Backup directory
- ${HOST_PATH_BACKUPDIR:-./backups}:/shared/backups:rw${MOUNT_OPTIONS}

php83:
<<: *default-php
image: johnea/php-fpm:8.3-prod
image: johnea/php-fpm:8.3-slim-0.152
hostname: php83
networks:
app_net:
Expand All @@ -211,3 +250,7 @@ services:
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
# - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
# Mount devilbox user-defined bash config
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
# Mount DB Backup directory
- ${HOST_PATH_BACKUPDIR:-./backups}:/shared/backups:rw${MOUNT_OPTIONS}
20 changes: 10 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
# Bind (DNS Server)
# ------------------------------------------------------------
bind:
image: johnea/bind:alpine
image: johnea/bind:alpine-0.36
hostname: bind
restart: always
ports:
Expand Down Expand Up @@ -87,9 +87,9 @@ services:

# MacOS and Windows have this by default, this hack also allows it for Linux
extra_hosts:
docker.for.lin.host.internal: 172.16.238.1
docker.for.lin.localhost: 172.16.238.1
host.docker.internal: host-gateway
- "docker.for.lin.host.internal:172.16.238.1"
- "docker.for.lin.localhost:172.16.238.1"
- "host.docker.internal:host-gateway"

networks:
app_net:
Expand All @@ -100,7 +100,7 @@ services:
# PHP
# ------------------------------------------------------------
php:
image: johnea/php-fpm:${PHP_SERVER}-work
image: johnea/php-fpm:${PHP_SERVER}-work-0.152
hostname: php

##
Expand Down Expand Up @@ -174,9 +174,9 @@ services:

# MacOS and Windows have this by default, this hack also allows it for Linux
extra_hosts:
docker.for.lin.host.internal: 172.16.238.1
docker.for.lin.localhost: 172.16.238.1
host.docker.internal: host-gateway
- "docker.for.lin.host.internal:172.16.238.1"
- "docker.for.lin.localhost:172.16.238.1"
- "host.docker.internal:host-gateway"

networks:
app_net:
Expand Down Expand Up @@ -233,7 +233,7 @@ services:
# Web Server
# ------------------------------------------------------------
httpd:
image: johnea/webserver:${HTTPD_SERVER}-${HTTPD_FLAVOUR:-alpine}
image: johnea/webserver:${HTTPD_SERVER}-${HTTPD_FLAVOUR:-alpine}-1.3
hostname: httpd

environment:
Expand Down Expand Up @@ -345,7 +345,7 @@ services:
# MySQL Database
# ------------------------------------------------------------
mysql:
image: johnea/mysql:${MYSQL_SERVER}
image: johnea/mysql:${MYSQL_SERVER}-0.22
hostname: mysql

environment:
Expand Down
9 changes: 8 additions & 1 deletion shell.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
@echo off

docker-compose exec --user devilbox php /bin/sh -c "cd /shared/httpd; exec bash -l"
set php=php

if not "%~1"=="" (
set php=%1
)

docker-compose exec --user devilbox %php% /bin/sh -c "cd /shared/httpd; exec bash -l"
4 changes: 2 additions & 2 deletions shell.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

if hash docker-compose 2>/dev/null; then
docker-compose exec --user devilbox php bash -l
docker-compose exec --user devilbox ${1:-php} bash -l
else
docker compose exec --user devilbox php bash -l
docker compose exec --user devilbox ${1:-php} php bash -l
fi

0 comments on commit 9997f7a

Please sign in to comment.