Skip to content

Add Docker setup (PHP 7.4 + Apache + MySQL 8.0)#17

Open
gaetanocastaldo88 wants to merge 2 commits intoVTECRM:mainfrom
gaetanocastaldo88:feat/docker-setup
Open

Add Docker setup (PHP 7.4 + Apache + MySQL 8.0)#17
gaetanocastaldo88 wants to merge 2 commits intoVTECRM:mainfrom
gaetanocastaldo88:feat/docker-setup

Conversation

@gaetanocastaldo88
Copy link

Summary

This PR adds a self-contained Docker setup to run VTENext CE locally for development and testing, with no manual PHP or MySQL configuration required.

  • PHP 7.4 + Apache (Debian Bullseye) + MySQL 8.0
  • phpMyAdmin included (optional, via --profile tools)
  • All required PHP extensions pre-installed: curl, imap, gd, bcmath, mbstring, zip, pdo_mysql, mysqli, intl, opcache, apcu, sockets
  • Data persistence via named Docker volumes

Bug fixes included

Two bugs in the installation wizard are patched automatically:

  1. utils.php line 138check_db_utf8_support() is called as a global function but is defined as a static method inside Installation_Utils. Fixed by replacing with self::check_db_utf8_support() at build time.

  2. config.db.php — the wizard does not always write the DB config, leaving _DBC_TYPE_ placeholders. The entrypoint script writes this file from environment variables at container startup.

Usage

cp docker/.env.example docker/.env
docker compose -f docker/docker-compose.yml up -d --build

Open http://localhost:8080/install.php and follow the wizard.

Test plan

  • Built and tested on Docker Desktop (Windows)
  • Full installation wizard completed successfully
  • 331 tables created in MySQL
  • Admin login working after installation
  • Published on Docker Hub: https://hub.docker.com/r/gaetano88/vtenext-ce

Adds a self-contained Docker setup to run VTENext CE locally
for development and testing.

Stack:
- PHP 7.4 + Apache (Debian Bullseye)
- MySQL 8.0
- phpMyAdmin (optional, --profile tools)

Features:
- All required PHP extensions pre-installed (curl, imap, gd, bcmath,
  mbstring, zip, pdo_mysql, mysqli, intl, opcache, apcu, sockets)
- Automatic patch for check_db_utf8_support() static method bug
- config.db.php written from environment variables at startup
- Named volumes for data persistence across restarts
- Configurable via .env file

Usage:
  cp docker/.env.example docker/.env
  docker compose -f docker/docker-compose.yml up -d --build
  # open http://localhost:8080/install.php

Docker Hub: https://hub.docker.com/r/gaetano88/vtenext-ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant