Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
eee1fd6
Fix Docker build failure on Mac by adding fallback for php-zip instal…
Copilot Jan 4, 2026
39df396
Improve robustness of zip extension installation with directory creation
Copilot Jan 4, 2026
c31791a
Add GitHub Actions CI, improve shell scripts with error handling, and…
Copilot Jan 4, 2026
29bb41e
Remove 'main' branch from Docker workflow
nielsdrost7 Jan 4, 2026
3c0a548
Add individual container CI tests, compatibility docs, and ASCII art …
Copilot Jan 4, 2026
31d91c8
Add PECL fallbacks for BZ2/GMP/IMAP/Redis, update banner colors, add …
Copilot Jan 4, 2026
637e606
Fix CI: Replace docker-compose with docker compose for GitHub Actions…
Copilot Jan 4, 2026
d0d6320
Refactor: Consolidate banner scripts following DRY/SOLID principles, …
Copilot Jan 4, 2026
a0a5b78
Rename test-individual-containers.yml to test-containers.yml
nielsdrost7 Jan 4, 2026
2a20dc5
Update COPY commands for invoiceplane-banner.sh
nielsdrost7 Jan 4, 2026
d4c02ca
Fix COPY path for invoiceplane-banner.sh
nielsdrost7 Jan 4, 2026
561e610
Rename .docker/shared/invoiceplane-banner.sh to .docker/invoiceplane-…
nielsdrost7 Jan 4, 2026
0f6156f
Fix Docker COPY paths for invoiceplane-banner.sh
Copilot Jan 4, 2026
dcdd030
Add documentation for banner file maintenance
Copilot Jan 4, 2026
11ae276
Refactor to DRY: Use single banner file with updated build context
Copilot Jan 4, 2026
373f8d2
Add InvoicePlane banner to nginx and php-worker containers
Copilot Jan 4, 2026
b2f27d9
Apply suggestions from code review
nielsdrost7 Jan 4, 2026
a105fd1
Standardize build context and add line ending normalization
Copilot Jan 4, 2026
93b0dc0
Update .docker/nginx/Dockerfile
nielsdrost7 Jan 5, 2026
56f130f
Update .docker/php-worker/Dockerfile
nielsdrost7 Jan 5, 2026
d6fc4b1
Replace ADD with COPY for startup.sh in Dockerfile
nielsdrost7 Jan 5, 2026
7475286
Fix Docker build failures in workspace and MariaDB tests
Copilot Jan 5, 2026
d009ec3
Apply pecl channel-update fix to all Dockerfiles
Copilot Jan 5, 2026
4e4f94f
Fix GID conflict and limit workflows to manual dispatch only
Copilot Jan 5, 2026
45a64cb
Fix group creation failure in workspace Dockerfiles
Copilot Jan 5, 2026
ae791d5
Fix Docker build failure by simplifying zip extension installation
Copilot Jan 5, 2026
f2aef59
Fix workspace Docker build by removing php-zip package installation
Copilot Jan 5, 2026
e8221b5
Remove accidentally committed test env file
Copilot Jan 5, 2026
072e201
Refine user creation logic based on code review feedback
Copilot Jan 5, 2026
4737afd
Add error handling for php-zip package installation per review feedback
Copilot Jan 5, 2026
f4ff6f4
Wrap pecl install commands with || true in workspace Dockerfile
Copilot Jan 5, 2026
cad6009
Wrap pecl install commands with || true in Dockerfile.74
Copilot Jan 5, 2026
d948442
Wrap pecl install commands with || true in php-fpm Dockerfile
Copilot Jan 5, 2026
d19fb64
Wrap pecl install commands with || true in php-worker and laravel-hor…
Copilot Jan 5, 2026
d0cfe40
Disable Python 2 installation in .env.example
Copilot Jan 5, 2026
19b4a7f
Make Python installations fault-tolerant and disable in CI tests
Copilot Jan 5, 2026
956a050
Remove redundant sed command for WORKSPACE_INSTALL_PYTHON
Copilot Jan 5, 2026
7163add
Fix wkhtmltopdf installation error with graceful error handling and w…
Copilot Jan 5, 2026
0ac7ebd
Add wkhtmltopdf disable to test-containers workflow
Copilot Jan 5, 2026
2326688
Fix xdebug.so loading warnings in php-worker by suppressing stderr an…
Copilot Jan 5, 2026
42fac53
Remove accidentally committed test env file and add to gitignore
Copilot Jan 5, 2026
6ebd5a3
Update .docker/php-worker/Dockerfile
nielsdrost7 Jan 5, 2026
84763ec
Update .gitignore to include .env.test
nielsdrost7 Jan 5, 2026
fa4794f
Fix Xdebug connection warnings during Docker build by using trigger mode
Copilot Jan 5, 2026
3a7fff6
Add Xdebug usage documentation to README
Copilot Jan 5, 2026
78632b0
Add Docker build caching documentation to README
Copilot Jan 5, 2026
87b875f
Add explanatory comments for Xdebug configuration in Dockerfiles
Copilot Jan 5, 2026
2b03911
docs: Create comprehensive guidelines and improve README
Copilot Jan 5, 2026
5574091
docs: Fix script name typo and update dates to 2025
Copilot Jan 5, 2026
a4c99ae
Fix comments and sed patterns, add beginner-friendly setup guide
Copilot Jan 5, 2026
e0b791e
Make sed pattern consistent across all Dockerfiles
Copilot Jan 5, 2026
06ab158
Improve setup guide clarity and fix documentation nitpicks
Copilot Jan 5, 2026
494a805
Add missing section header for hosts file step
Copilot Jan 5, 2026
c81fa1e
Remove tenants directory mapping from volumes
nielsdrost7 Jan 7, 2026
8ad2b8c
Update PHP version from 8.1 to 8.4
nielsdrost7 Jan 7, 2026
d101f84
Update PHP version to 8.4 in README
nielsdrost7 Jan 7, 2026
76bea2d
Address code review feedback: fix banner, Dockerfile improvements, wo…
Copilot Jan 7, 2026
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
85 changes: 85 additions & 0 deletions .docker/invoiceplane-banner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/bash
# InvoicePlane Docker Container Banner
# Shared banner script for all InvoicePlane Docker containers
# Follows DRY, SOLID, and early return principles

# Early return if not in interactive shell
[[ $- != *i* ]] && return

# Color definitions - InvoicePlane brand colors
readonly IPBLUE='\033[38;2;66;154;225m' # #429AE1 - InvoicePlane brand blue
readonly GREEN='\033[0;32m'
readonly YELLOW='\033[1;33m'
readonly NC='\033[0m' # No Color

# Helper function to display the InvoicePlane ASCII logo
show_logo() {
cat << 'EOF'
____ _ ____ __
/ _/___ _ ______ (_)_______ / __ \/ /___ _____ ___
/ // __ \ | / / __ \/ / ___/ _ / /_/ / / __ `/ __ \/ _ \
_/ // / / / |/ / /_/ / / /__/ __/ ____/ / /_/ / / / / __/
/___/_/ /_/|___/\____/_/\___/\___/_/ /_/\__,_/_/ /_/\___/

EOF
}

# Helper function to show PHP version if available
show_php_version() {
if command -v php >/dev/null 2>&1; then
local php_version
php_version=$(php -v 2>/dev/null | head -n1 | cut -d' ' -f2 || echo "unknown")
echo -e "${IPBLUE}║${NC} PHP Version: ${GREEN}${php_version}${NC}"
fi
}

# Helper function to show quick commands
show_quick_commands() {
echo ""
echo -e "${IPBLUE}Quick Commands:${NC}"

# Show PHP-related commands if PHP is available
if command -v php >/dev/null 2>&1; then
echo -e " ${GREEN}php -v${NC} - Check PHP version"
fi

# Show Composer if available
if command -v composer >/dev/null 2>&1; then
echo -e " ${GREEN}composer${NC} - Run Composer"
fi

# Show common directories
if [[ -d /var/www/projects ]]; then
echo -e " ${GREEN}cd /var/www/projects${NC} - Go to projects directory"
fi

echo ""
}

# Main banner display function
display_banner() {
local container_type="${CONTAINER_TYPE:-InvoicePlane Docker Environment}"

# Display logo
show_logo

# Display info box with PHP version if available
echo -e "${IPBLUE}╔════════════════════════════════════════════════════════════╗${NC}"
echo -e "${IPBLUE}║${NC} Welcome to ${container_type} ${IPBLUE}║${NC}"
show_php_version
echo -e "${IPBLUE}╚════════════════════════════════════════════════════════════╝${NC}"

# Show additional info
local user_name host_name current_dir
user_name=$(whoami 2>/dev/null || echo "unknown")
host_name=$(hostname 2>/dev/null || echo "unknown")
current_dir=$(pwd 2>/dev/null || echo "~")

echo -e "Container: ${GREEN}${host_name}${NC} | User: ${YELLOW}${user_name}${NC} | Dir: ${GREEN}${current_dir}${NC}"

# Display quick commands
show_quick_commands
}

# Execute main function
display_banner
24 changes: 12 additions & 12 deletions .docker/laravel-horizon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RUN apk --update add wget \
apk --update add openssl-dev; \
fi

RUN pecl channel-update pecl.php.net; \
RUN (pecl channel-update pecl.php.net || true); \
docker-php-ext-install mysqli mbstring pdo pdo_mysql xml pcntl; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] && \
[ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") != "80000" ]; then \
Expand Down Expand Up @@ -74,7 +74,7 @@ ARG INSTALL_GNUPG=false
RUN set -eux; if [ ${INSTALL_GNUPG} = true ]; then \
apk add --no-cache --no-progress --virtual BUILD_DEPS_PHP_GNUPG gpgme-dev; \
apk add --no-cache --no-progress gpgme; \
pecl install gnupg; \
(pecl install gnupg || true); \
docker-php-ext-enable gnupg; \
fi

Expand Down Expand Up @@ -119,7 +119,7 @@ RUN set -eux; \
make install && \
rm -r /tmp/imagick; \
else \
pecl install imagick; \
(pecl install imagick || true); \
fi && \
docker-php-ext-enable imagick; \
php -m | grep -q 'imagick'; \
Expand Down Expand Up @@ -170,9 +170,9 @@ ARG INSTALL_PHPREDIS=false
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
# Install Php Redis Extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
printf "\n" | pecl install -o -f redis-4.3.0; \
(printf "\n" | pecl install -o -f redis-4.3.0 || true); \
else \
printf "\n" | pecl install -o -f redis; \
(printf "\n" | pecl install -o -f redis || true); \
fi; \
rm -rf /tmp/pear; \
docker-php-ext-enable redis; \
Expand Down Expand Up @@ -248,10 +248,10 @@ RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install mongo; \
(pecl install mongo || true); \
docker-php-ext-enable mongo; \
else \
pecl install mongodb; \
(pecl install mongodb || true); \
docker-php-ext-enable mongodb; \
fi; \
fi
Expand All @@ -267,11 +267,11 @@ RUN if [ ${INSTALL_YAML} = true ]; then \
&& apk add --no-cache yaml \
&& docker-php-source extract; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install yaml-1.3.2; \
(pecl install yaml-1.3.2 || true); \
elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
pecl install yaml-2.0.4; \
(pecl install yaml-2.0.4 || true); \
else \
pecl install yaml; \
(pecl install yaml || true); \
fi \
&& docker-php-ext-enable yaml \
&& pecl clear-cache \
Expand All @@ -289,9 +289,9 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
apk --update add libmemcached-dev; \
# Install the php memcached extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install memcached-2.2.0; \
(pecl install memcached-2.2.0 || true); \
else \
pecl install memcached; \
(pecl install memcached || true); \
fi; \
docker-php-ext-enable memcached; \
php -m | grep -r 'memcached'; \
Expand Down
2 changes: 1 addition & 1 deletion .docker/mariadb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LABEL maintainer="Mahmoud Zalt <[email protected]>"
ARG TZ=UTC
ENV TZ ${TZ}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && chown -R mysql:root /var/lib/mysql/
COPY my.cnf /etc/mysql/my.cnf
COPY mariadb/my.cnf /etc/mysql/my.cnf

RUN chmod -R 644 /etc/mysql/my.cnf

Expand Down
31 changes: 29 additions & 2 deletions .docker/nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM nginx:alpine

LABEL maintainer="Mahmoud Zalt <[email protected]>"

COPY nginx.conf /etc/nginx/
COPY nginx/nginx.conf /etc/nginx/

RUN apk update \
&& apk upgrade \
Expand All @@ -24,8 +24,35 @@ RUN touch /var/log/messages
RUN echo "upstream php-upstream { server ${PHP_UPSTREAM_CONTAINER}:${PHP_UPSTREAM_PORT}; }" > /etc/nginx/conf.d/upstream.conf \
&& rm /etc/nginx/conf.d/default.conf

ADD ./startup.sh /opt/startup.sh
COPY nginx/startup.sh /opt/startup.sh
RUN sed -i 's/\r//g' /opt/startup.sh

# Add InvoicePlane banner to bash profile
COPY invoiceplane-banner.sh /root/invoiceplane-banner.sh
RUN sed -i 's/\r//g' /root/invoiceplane-banner.sh && \
chmod +x /root/invoiceplane-banner.sh && \
echo "" >> /root/.bashrc && \
echo "# Set container type for banner" >> /root/.bashrc && \
echo "export CONTAINER_TYPE='Nginx Container'" >> /root/.bashrc && \
echo "# Load InvoicePlane Banner" >> /root/.bashrc && \
echo "if [ -f ~/invoiceplane-banner.sh ]; then" >> /root/.bashrc && \
echo " source ~/invoiceplane-banner.sh" >> /root/.bashrc && \
echo "fi" >> /root/.bashrc && \
# Also add banner for www-data user \
mkdir -p /home/www-data && \
cp /root/invoiceplane-banner.sh /home/www-data/invoiceplane-banner.sh && \
chown www-data:www-data /home/www-data/invoiceplane-banner.sh && \
chmod +x /home/www-data/invoiceplane-banner.sh && \
touch /home/www-data/.bashrc && \
chown www-data:www-data /home/www-data/.bashrc && \
echo "" >> /home/www-data/.bashrc && \
echo "# Set container type for banner" >> /home/www-data/.bashrc && \
echo "export CONTAINER_TYPE='Nginx Container'" >> /home/www-data/.bashrc && \
echo "# Load InvoicePlane Banner" >> /home/www-data/.bashrc && \
echo "if [ -f ~/invoiceplane-banner.sh ]; then" >> /home/www-data/.bashrc && \
echo " source ~/invoiceplane-banner.sh" >> /home/www-data/.bashrc && \
echo "fi" >> /home/www-data/.bashrc

CMD ["/bin/bash", "/opt/startup.sh"]

EXPOSE 80 81 443
Loading