Skip to content

Remove Docker Compose mount hack for archive/staged-archive directories #1478

@coderabbitai

Description

@coderabbitai

Context

Currently, the Docker Compose configuration contains a hack to avoid Docker creating directories as root on the host when mounting archive and staged-archive directories.

The issue arises because only one of CLP_ARCHIVE_OUTPUT_DIR_HOST and CLP_STAGED_ARCHIVE_OUTPUT_DIR_HOST is set at a time, but since ./var/data on the host is mounted into the container and both variables default to directories under ./var/data, Docker would create the unset directory on the host as root if we naively mount with a default path under /var/data.

Current Hack

When one of the variables is unset, we set the target for the corresponding mount to a path that's not under /var/data in the container to prevent Docker from creating it on the host.

See: https://github.com/y-scope/clp/blob/docker-compose/tools/deployment/package/docker-compose.base.yaml#L267-L283

Proposed Solution

Accept a var/tmp directory config from the user and generate all temporary runtime data in that directory instead of the current var/data directory. This would eliminate the need for the /var/data bind mount and remove the hack.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions