summaryrefslogtreecommitdiffstats
path: root/acid/cyche-build (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-26acid: Don't use 'cychedelic' in file namesMalfurious1-58/+0
As I add new components to the cychedelic system, it would be best to use more specific naming. 'cychedelic' is the name of the project, whereas 'acid' is the name of this program. Signed-off-by: Malfurious <m@lfurio.us>
2023-09-10acid: Sanitize filename inputs from the configMalfurious1-0/+6
Prevent the creation or access of unintended files in the ACID container. Also, assert that names are valid for docker before attempting to deploy images. Signed-off-by: Malfurious <m@lfurio.us>
2023-09-10acid: build: Always specify --project-nameMalfurious1-10/+10
The script is refactored to always provide an explicit --project-name option to docker compose. Still taken from the $CYCHE_SERVICES config and only modified if --self is given. This addresses an issue when using a docker-compose.yml from within a subdirectory. If --project-name is omitted, the directory name used by docker is the one containing the YML file, not the working directory (git repository root). When calling `docker compose down` (when given --self), we now omit the --file as it is unnecessary. Signed-off-by: Malfurious <m@lfurio.us>
2023-09-10Revert "acid: build: Cache path to the docker-compose.yml file"Malfurious1-1/+0
This ends up being unnecessary. We don't need the content of the YML file to correctly clean up resources. Docker compose inherently knows how to handle it. As long as we operate with the correct --project-name (whether it's explicitly given, or determined by current directory), `docker compose down` will do the job. We can therefore run from a workind directory that is unrelated to the target service, even if it contains a different docker-compose.yml file. This reverts commit 7a7ff89ff16542d30ff7c1f70689236b8fd9c607. Signed-off-by: Malfurious <m@lfurio.us>
2023-09-08acid: build: Cache path to the docker-compose.yml fileMalfurious1-0/+1
When a service entry is removed from $CYCHE_SERVICES, this value is lost, preventing us from properly tearing down the service. Signed-off-by: Malfurious <m@lfurio.us>
2023-08-19acid: Touch up some documentationMalfurious1-3/+3
Signed-off-by: Malfurious <m@lfurio.us>
2023-08-18acid: Make docker compose YML file configurableMalfurious1-10/+11
Facilitate deployments using alternate docker-compose.yml files, or projects which simply use a different filename for the configuration. This setting populates the `docker compose -f` option. Signed-off-by: Malfurious <m@lfurio.us>
2023-08-12acid: build: Bring cychedelic down under its default name as wellMalfurious1-0/+1
If cychedelic is ever started manually, using a pre-existing data volume, the system will believe the previous instance is using a specific random project name and may not properly shutdown the user-initiated instance on a rebuild. Simply attempting to stop the service using its default name will catch this, and not cause any problems in the general case. Signed-off-by: Malfurious <m@lfurio.us>
2023-08-12acid: build: Fix bug in cychedelic project-name generationMalfurious1-2/+4
The nested single quotes in these variables were not being interpreted correctly at their usage locations (the quoted project name was being sent to the docker cli). The quotes were initially wanted for the case where there is not yet any previous_slug, as the command "docker compose --project-name down" is ill-formed. Since we know the actual slug values will not contain spaces, we can do away with the quotes. Instead, prevent $prev from containing any content in the special case described above. This is accomplished by the conditional check [ -n "$prev" ]. Signed-off-by: Malfurious <m@lfurio.us>
2023-08-09acid: Add service build helper scriptMalfurious1-0/+48
This is a merged version of a normal service builder and a cychedelic self-builder. Signed-off-by: Malfurious <m@lfurio.us>