Skip to content

About

Warexo Dev Runtime

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Warexo Dev Runtime

Disposable Warexo development environments for Coolify.

This repository publishes the runtime image:

ghcr.io/aggrosoft/warexo-dev-runtime:main

Do not deploy this repository as a normal GitHub application in Coolify. Create a Docker Compose resource and choose a template:

Goal Template Setup
Work on a copy of an existing installation, including its database and deployed vendor patches compose.clone.coolify.example.yaml SSH clone setup
Opt in to PHP 7.4 + PHP 8.4 in one clone container, with separate porting files and database compose.clone.porting.coolify.example.yaml Optional porting workspace
Install a blank Warexo instance from Git compose.coolify.example.yaml Fresh-install instructions below

The clone mode accepts SSH access and an installation path. It reads the source database configuration, copies the deployed files, imports a transactional database dump, neutralizes known credentials, and starts Warexo only after these steps succeed. It does not run the live application, Composer, or the installer on the source.

Dual-PHP porting is a separate opt-in image/Compose variant. The standard image and clone workflow remain PHP 7.4-only. To add it to an existing clone, keep that Coolify resource and its reference volumes; see PORTING.md.

Runtime

The image intentionally keeps the legacy application stack stable:

  • PHP 7.4 + Apache
  • Symfony production environment
  • Composer 1 for the committed legacy lock file
  • headless LibreOffice (soffice on PATH, callable via PHP exec())
  • MariaDB 10.11 in the Coolify template
  • Mailpit for development mail
  • no Warexo cron jobs by default
  • application files persisted in a named volume

The Warexo source itself is not part of this repository. Fresh mode checks it out from Git; clone mode copies it from the existing installation into:

/var/www/html

Create a fresh instance in Coolify

  1. Create a Docker Compose resource.
  2. Paste/use compose.coolify.example.yaml.
  3. Set the required Git variables.
  4. Deploy.

The warexo service exposes port 80 through Coolify using:

SERVICE_URL_WAREXO_80=/
SERVICE_FQDN_WAREXO

Coolify generates the internal database passwords and application secret through its SERVICE_PASSWORD_* / SERVICE_BASE64_* variables.

Required environment for a fresh instance

Only source-repository access is required for a blank development instance:

WAREXO_GIT_URL=ssh://user@git-host.example/path/to/warexo.git
WAREXO_GIT_REF=master

WAREXO_GIT_PRIVATE_KEY=...
WAREXO_GIT_KNOWN_HOSTS=...

WAREXO_GIT_PRIVATE_KEY is the private SSH key used from the Warexo container to the self-hosted repository host. It is unrelated to developer SSH access.

For non-standard SSH ports, use an SSH URL that contains the port and put the matching [host]:port entry into WAREXO_GIT_KNOWN_HOSTS.

Developer SSH / VS Code

Remote access is handled by the central:

aggrosoft/coolify-ssh-bridge

The Compose template enables it with:

AGGRO_SSH_ENABLED=true

There are no SSHPiper labels, no per-instance authorized_keys, and no developer-facing SSH daemon in the Warexo image.

The bridge enters the running Compose service through Docker exec. For this template the service name is:

warexo

The working tree is:

/var/www/html

VS Code server and Codex state have their own persistent volumes.

Development filesystem permissions

This disposable runtime deliberately uses one application account: developer. Apache/PHP, Git checkout, Composer and Symfony console commands all operate as that user. The central SSH bridge may still enter as root, which can access the same workspace. Startup normalizes ownership of /var/www/html (including web/) before and after bootstrapping so application-generated CSS, JMS metadata caches, and other files remain writable. Composer and cache warmup use developer:developer consistently; no separate www-data file owner/group is needed. This is a development-only convenience and is not a production security model.

First bootstrap of a fresh instance

On first start the runtime:

  1. configures SSH access to the self-hosted Git repository
  2. clones Warexo into the persistent source volume
  3. checks out WAREXO_GIT_REF
  4. generates app/config/parameters.yml
  5. runs the committed Composer lock file
  6. warms the Symfony production cache
  7. starts Apache
  8. leaves the fresh database ready for /install.php

A failed bootstrap does not stop the container. The instance remains reachable for inspection and the next restart resumes incomplete initialization.

The successful runtime initialization marker is:

/var/lib/warexo/runtime-initialized

Database and application configuration

The Coolify template generates:

database: warexo
user:     warexo
password: SERVICE_PASSWORD_64_DB
secret:   SERVICE_BASE64_64_APP

The runtime writes these values to the legacy:

app/config/parameters.yml

Set WAREXO_LICENSE as a Coolify environment variable to populate the license field in app/config/parameters.yml. The setting is optional and defaults to an empty value. The parameters file is regenerated on every container start, so changing the variable takes effect after recreating or restarting the Warexo service. The license value is YAML-quoted to preserve special characters.

Mail is redirected to the local mailpit service.

Composer and tracked vendor patches in fresh mode

The historical Warexo release process builds the application archive and Composer vendor archive separately. The dev runtime follows that separation:

  • Composer 1 runs in a temporary staging directory using the checked-out composer.json and composer.lock.
  • It uses --prefer-source --no-scripts and never runs Composer in the Git tree.
  • The generated vendor/ is copied into the application, excluding every file tracked by Git under vendor/. This preserves historical Warexo patches.
  • The Symfony cache warmup is run separately. The tracked app/cache/.gitignore file is not deleted.

This is a first-bootstrap change, not a cleanup of existing installations. Existing tracked modifications from earlier in-place Composer installs remain until reviewed and deliberately reverted. The application source and database volumes are retained across normal redeploys.

Git checkout in fresh mode

To switch the running working copy:

/opt/warexo/bin/warexo-checkout feature/foo

This fetches the remote, checks out the requested branch/tag/commit, runs Composer install and rebuilds the Symfony cache.

Normal container restarts do not reset or switch the working copy.

Fresh database setup

Instances created from compose.coolify.example.yaml intentionally start with a fresh MariaDB database. To import an existing installation, use the separate clone template.

The runtime prepares the application code and configuration, then leaves schema/data initialization to Warexo's own installer:

/install.php

This keeps the database schema tied to the checked-out Warexo revision instead of coupling a current Git branch to an unrelated historical live dump.

A clean reset is therefore the disposable-resource workflow:

  1. delete the Coolify Compose resource
  2. delete its named volumes
  3. create a new resource from compose.coolify.example.yaml
  4. run the Warexo installer again

Normal container restarts keep the existing working tree and development database.

Safety

Production Warexo cron jobs are intentionally absent. The existing production schedule contains imports, mail delivery, mailbox polling, downloads, subscriptions and webshop exports. They must not start automatically in a cloned development database.

Clone mode additionally clears known integration credentials, resets development access, disables database events, and isolates the application on an internal Docker network behind a fixed reverse proxy. It preserves business data and is not full anonymization. See clone boundaries and recovery.

About

Warexo Dev Runtime

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages