add ns compose

This commit is contained in:
Rodolfo Berrios
2025-12-02 14:13:30 -03:00
parent 6f316319d4
commit 30f1bcebcc
4 changed files with 10 additions and 3 deletions

View File

@@ -16,8 +16,10 @@ ifneq ("$(wildcard ${ENV_FILE})","")
export $(shell sed 's/=.*//' ${ENV_FILE})
endif
SOURCE ?= ~/git/chevereto/v4
# For legacy reasons, default uses mariadb.
# Newer installations recommend TARGET=default-mysql instead.
TARGET ?= default# default|dev
VERSION ?= 4.3
VERSION ?= 4.4
PHP ?= 8.2
EDITION ?= $(shell [ "${CHEVERETO_LICENSE_KEY}" = "" ] && echo free || echo pro)
DOCKER_USER ?= www-data
@@ -216,6 +218,7 @@ namespace:
NAMESPACE_EXISTS=${NAMESPACE_EXISTS} \
NAMESPACE_FILE=${NAMESPACE_FILE} \
HOSTNAME=${HOSTNAME} \
COMPOSE=${COMPOSE} \
ENCRYPTION_KEY=${ENCRYPTION_KEY} \
./scripts/system/namespace.sh

View File

@@ -2,6 +2,8 @@
This project includes shortcuts for running `docker compose` commands. It uses `default.yml` but it can also use your own compose file.
**Note:** For legacy reasons this project uses `default.yml` (MariaDB) as the default compose file. We recommend using `default-mysql.yml` for MySQL setups.
* Requires [Compose V2](https://docs.docker.com/compose/cli-command/)
* Place a `docker-compose.yml` file to use your own instead of [default.yml](../default.yml)
* Pass `COMPOSE=my-compose` to use `my-compose.yml`

View File

@@ -12,11 +12,12 @@ Required options:
* NAMESPACE=chevereto
* HOSTNAME=localhost
* COMPOSE=default-mysql
For example, to create the `nasa` namespace for `photos.nasa.gov`:
For example, to create the `nasa` namespace for `photos.nasa.gov` and using the `default-mysql` compose file run:
```sh
make namespace NAMESPACE=nasa HOSTNAME=photos.nasa.gov
make namespace NAMESPACE=nasa HOSTNAME=photos.nasa.gov COMPOSE=default-mysql
```
This will create `./namespace/nasa` with the minimum namespaced scoped variables required:

View File

@@ -11,6 +11,7 @@ if [ "${ENCRYPTION_KEY}" == "" ]; then
fi
mkdir -p $(dirname ${NAMESPACE_FILE})
cat >${NAMESPACE_FILE} <<EOM
COMPOSE=${COMPOSE}
HOSTNAME=${HOSTNAME}
ENCRYPTION_KEY=${ENCRYPTION_KEY}
EOM