# Project plan — evolve-infra

Evidence date: 2026-10-15.

Source repository: `git@bitbucket.org:overdrive/evolve-infra.git`.

Inspected revision: `master` at `35effc1` (2019-03-15, "Adding PHPMyAdmin"). Only branch: `master`. `origin/HEAD` points at `master`.

This plan describes what the repository contains. It does not decide what the product should become.

The local scan path named when this task was created (`~/projects/sonar_scan/repos/evolve-infra`) was not present on this machine. Evidence below is from a read-only clone of `origin/master`. The stack was not started.

## Product

The README titles the repository "Evolve Infrastructure Repository" and says it holds the base primitives for development and deployment of the Evolve applications. The only environment the README and `docker-compose.yml` describe is a local Docker stack for the Magus PHP Zend application. Provenance: **Documented** (README) and **Implemented** (`docker-compose.yml`).

"Evolve Applications" (plural) and "deployment" are README wording. No second application, and no production Compose override, are in the tree. Provenance: **Documented** claim, **not implemented** beyond the one Magus development stack.

End-user accreditation behaviour lives in `magus-core`, not here. See `silicon_ark/magus-core/`.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `master` (default; `origin/HEAD`) | `35effc1` | 2019-03-15 | Docker Compose stack, nginx site file, PHP image, phpMyAdmin, Magus submodule pin |

History is six commits, all by Mandus Momberg on 15 March 2019:

| Commit | Time (author, -0700) | Subject |
|---|---|---|
| `a5b8870` | 13:10 | First commit to Evolve Container Infrastructure |
| `2cf321b` | 13:38 | Adding GD & MySQLi support to PHP Container |
| `3b4de76` | 14:58 | Changed to PDO_MYSQL; Updating ref for magus-core |
| `dda9d6e` | 15:01 | Tracking Master Branch for magus-core |
| `fc79c98` | 15:12 | Adding Readme.md |
| `35effc1` | 15:32 | Adding PHPMyAdmin |

No other branches, tags, or later commits were on the remote that was cloned.

The task-creation scan listed `sonar-project.properties` and `sonarqube_scan.bat` at the repository root. Neither file is in `master`. Provenance: **Unknown** — they may have been untracked files on the scan host.

## Objectives

No project plan or roadmap exists beyond the README. The following are **Inferred** from the README and Compose file:

- Give a developer Docker, so they can run Magus on the host at `http://localhost:8080`.
- Load a MariaDB database from `magus-core/admin_magus.sql`.
- Offer phpMyAdmin at `http://localhost:8081`.
- Keep application source in the `magus-core` submodule, and commit application changes to that repository.

## Scope

### In scope of this repository

- `docker-compose.yml` with services `http`, `php`, `database`, and `phpmyadmin`.
- `nginx-site.conf`, mounted as the nginx default site.
- `php/Dockerfile`, building a local image tagged `php:fpm-evolve`.
- `php-test/public/index.php`, a standalone PHP script. Compose does not mount it.
- `nginx.conf`, a stock nginx main file. Compose does not mount it.
- `.gitmodules` and a gitlink for `magus-core`.

### Out of scope / not in this repository

- Magus application code, the SQL dump, and Zend configuration. Those are the submodule `git@github.com:EvolveAV/magus-core.git`, pinned at `9b5b3e2`. The Overdrive copy documented in `silicon_ark/magus-core/` is `git@bitbucket.org:overdrive/magus-core.git`. The same SHA exists there.
- A production host, TLS certificate, CI pipeline, or second Evolve application.
- The MariaDB, nginx, PHP, and phpMyAdmin image contents. This repo only names the tags.

## System architecture

```text
Browser
  -> host port 8080
  -> service http (nginx:stable-alpine)
  -> root /code/public (bind-mounted magus-core)
  -> FastCGI service php:9000 (image built from php/Dockerfile)
  -> MariaDB service database (database name magus_dev)
  -> optional host port 8081 -> service phpmyadmin
```

`APPLICATION_ENV` on the `php` service is `development`.

The gitlink at `35effc1` is `9b5b3e2` ("Updating Database Connection Details", 2019-03-15). In that revision, the `[development]` section of `application/configs/application.ini` sets host `database`, user `root`, password `root`, database `magus_dev`. That matches this Compose file. Provenance: **Implemented** in the pinned file. The later Magus tip `f806a7e` changes that development section to host `localhost`, database `magus`, empty password. `evolve-infra` does not pin `f806a7e`.

The README tells the reader to run `git submodule update --recursive --remote`. `.gitmodules` sets `branch = master`. `--remote` checks out the remote branch tip, which is not the recorded gitlink. Provenance: **Documented** procedure versus **Implemented** pin. See the confirmation list.

## Major components

| Component | Path | Role |
|---|---|---|
| Compose stack | `docker-compose.yml` | Four services, host ports 8080 and 8081 |
| Site config | `nginx-site.conf` | Document root `/code/public`, PHP via FastCGI, deny `.htaccess` |
| Unused nginx main file | `nginx.conf` | Not referenced by Compose |
| PHP image | `php/Dockerfile` | `pdo_mysql` and `gd` on `php:fpm-alpine` |
| Diagnostic script | `php-test/public/index.php` | mysqli probe and `phpinfo()`; not mounted |
| Application pin | `magus-core` gitlink | `9b5b3e2` |
| Operator notes | `Readme.md` | Clone, submodule, `docker-compose up`, MySQL exec, phpMyAdmin |

## Milestones visible in git

There is no milestone plan. The repository was created and last changed on the same day (15 March 2019). Nothing in git describes a later phase.

## Known dependencies

- Docker and docker-compose, named by the README. The README's launch command is the v1-style `docker-compose` binary. Which Compose generation was used in 2019 is **Unknown**.
- git, including submodule support.
- Images named in Compose, none digest-pinned: `nginx:stable-alpine`, `mariadb`, `phpmyadmin/phpmyadmin`, and base `php:fpm-alpine`.
- The Magus tree at the submodule URL, including `public/` (nginx root) and `admin_magus.sql` (database init mount).
- PHP extensions the application calls that this Dockerfile does not install. `silicon_ark/magus-core/` records `mcrypt_create_iv`. This image installs `pdo_mysql` and `gd` only.

## Current project status

**Frozen snapshot.** Last change 2019-03-15. No open branch, no tests, no pipeline.

The files describe a local development stack. They were not executed for this document, so "the containers come up" is **not** confirmed here.

Two procedures in the README disagree with the pin:

- Clone URL in the README: `git@github.com:EvolveAV/evolve-infra.git`. The repository inspected is `git@bitbucket.org:overdrive/evolve-infra.git`. Whether the GitHub remote still matches was not checked.
- `git submodule update --recursive --remote` follows `master` of `git@github.com:EvolveAV/magus-core.git`. The gitlink is `9b5b3e2`. Bitbucket `magus-core` `master` is `f806a7e`, whose development database settings do not match this Compose file.

## Related Silicon Ark directories

`silicon_ark/magus-core/` documents the application this stack bind-mounts. Its inspected tip is `f806a7e` (2019-08-19), five months after this infra pin.

`silicon_ark/magusEvents/` is a different product (WPF scanner). It is not a service in this Compose file.

## Items that need human confirmation

- Whether `git@github.com:EvolveAV/evolve-infra.git` and `git@github.com:EvolveAV/magus-core.git` are still the upstreams, and whether they differ from the Bitbucket copies.
- Whether operators are expected to stay on gitlink `9b5b3e2` or to follow the README and move the submodule to the remote `master` tip.
- Which database the MariaDB image actually loads from `admin_magus.sql`. The dump has no `CREATE DATABASE` statement. Its header comment names `admin_magus`. Compose sets `MYSQL_DATABASE` to `magus_dev`. The image entrypoint is not in this repository, and the stack was not started.
- Whether nginx `try_files` in `nginx-site.conf` is enough for Zend routing. The application tree expects Apache `.htaccess`. That combination was not run.
- Whether the unpinned `php:fpm-alpine` tag from 2019, or the tag Docker would pull now, can run this application (`mcrypt`, Zend Framework 1).
- The README's `docker exec` name `evolve-infra_database_1` (Compose v1). Compose v2 uses a different container name. Which name operators hit is **Unknown**.
- The scan-host files `sonar-project.properties` and `sonarqube_scan.bat` are not in git.
- Committed development credentials (`root` / `root`) are in Compose, the README, and `php-test`. Whether this stack was ever exposed beyond a workstation is **Unknown**.
