Add easy way to integrate additional files to deployment #489

Open
opened 2023-09-03 16:29:54 +00:00 by iexos · 1 comment
Member

There are cases where adding a custom file to a deployment would be very helpful, for example to add a logo or overwrite a special config file, that might not make sense to fully represent in the .env file (e.g. custom css files, extensive configs as with mediawiki).

A good solution would be to provide a simple list with source:target in .env. Source files should be found relative to the servers/<domain>/ folder, as you'd probably store it in git with the cc configs.

There are cases where adding a custom file to a deployment would be very helpful, for example to add a logo or overwrite a special config file, that might not make sense to fully represent in the `.env` file (e.g. custom css files, extensive configs as with mediawiki). A good solution would be to provide a simple list with `source:target` in `.env`. Source files should be found relative to the `servers/<domain>/` folder, as you'd probably store it in git with the cc configs.
iexos added the
enhancement
label 2023-09-03 16:29:54 +00:00
Author
Member

This is my workaround, though I don't find it very elegant:

Additional files:

$ ls ~/.abra/servers/<domain>/<app_name>/
compose.yml
logo.svg

In <domain>.env:

COMPOSE_FILE="compose.yml:../../servers/<domain>/<app_name>/compose.yml"

In ~/.abra/servers/<domain>/<app_name>/compose.yml:

version: '3.8'

services:
  app:
    configs:
      - source: logo
        target: /path/to/logo.svg

configs:
  logo:
    name: logo_v1
    file: ../../servers/<domain>/<app_name>/logo.svg

The upside of this method is being able to add anything I'd want without modifying the recipe.

This is my workaround, though I don't find it very elegant: Additional files: ``` $ ls ~/.abra/servers/<domain>/<app_name>/ compose.yml logo.svg ``` In `<domain>.env`: ``` COMPOSE_FILE="compose.yml:../../servers/<domain>/<app_name>/compose.yml" ``` In `~/.abra/servers/<domain>/<app_name>/compose.yml`: ``` version: '3.8' services: app: configs: - source: logo target: /path/to/logo.svg configs: logo: name: logo_v1 file: ../../servers/<domain>/<app_name>/logo.svg ``` The upside of this method is being able to add anything I'd want without modifying the recipe.
decentral1se added the
abra
label 2023-09-05 15:47:30 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#489
No description provided.