move the stack catalogue out of the framework
stack/ and docker/ now live in the myos-stacks project (extracted with their history). What the framework itself needs stays here: - stack/myos/*.yml -> share/compose/ - docker/myos/ -> share/docker/myos/ - docker/compose/ -> dropped, docker compose >= 2.24.4 is now required Residues fixed along the way: DOCKER_IMAGES scanned a hardcoded ./docker, include.mk filtered a hardcoded stack/*.mk, and docker-image-myos expanded an undefined MYOS_DOCKER_IMAGES on every up/build. README and CHANGELOG rewritten: they still documented make host, host-certbot-* and user-config, all removed when the catalogue was split out.
This commit is contained in:
@@ -1,5 +1,14 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## v1.1 - 2026-09-03
|
||||||
|
|
||||||
|
- move the stack catalogue and the docker build contexts to the myos-stacks project
|
||||||
|
- keep the framework infra compose files in share/compose and the myos tool image in share/docker
|
||||||
|
- fix stack_path resolution: host/<svc> stacks were only found when the project
|
||||||
|
stack directory sorted first
|
||||||
|
- drop the docker/compose image fallback: docker compose >= 2.24.4 or docker-compose is required
|
||||||
|
- add a shellspec golden test harness (make test)
|
||||||
|
|
||||||
## v1.0-beta - 2026-07-29
|
## v1.0-beta - 2026-07-29
|
||||||
|
|
||||||
* split make files in `myos` project and docker files in `stack` project
|
* split make files in `myos` project and docker files in `stack` project
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
# myos - Make Your Own Stack
|
# myos - Make Your Own Stack
|
||||||
|
|
||||||
Make Your Own Stack provides common make targets to build and run docker projects.
|
myos runs docker compose stacks: on a server, in a project directory, for a user.
|
||||||
|
It is a thin layer over `docker compose` that resolves which compose files to load,
|
||||||
|
under which project name, with which environment variables.
|
||||||
|
|
||||||
|
The framework itself ships no stack. Ready-to-use stacks (consul, fabio, registrator,
|
||||||
|
postgres, supabase, drone, …) live in a separate catalogue,
|
||||||
|
[myos-stacks](https://github.com/aya/myos-stacks).
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
|
|
||||||
@@ -8,197 +14,119 @@ This is beta software, use it at your own risks.
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
You need `docker`, `git` and `make`.
|
`docker` (with the `docker compose` plugin >= 2.24.4, or a `docker-compose` binary),
|
||||||
|
`git` and `make`.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
* Include MYOS file `make/include.mk` adding the following lines to your project file `Makefile`.
|
### As a command
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo git clone https://github.com/aya/myos /usr/local/lib/myos
|
||||||
|
sudo ln -s /usr/local/lib/myos/myos /usr/local/bin/myos
|
||||||
```
|
```
|
||||||
MYOS ?= ../myos
|
|
||||||
MYOS_REPOSITORY ?= $(patsubst %/$(THIS),%/myos,$(THIS_REPOSITORY))
|
Optionally pin per-machine settings in `/etc/conf.d/myos` (or `/etc/default/myos`),
|
||||||
THIS ?= $(lastword $(subst /, ,$(THIS_REPOSITORY)))
|
one `VAR=value` per line, no comments:
|
||||||
THIS_REPOSITORY ?= $(shell git config --get remote.origin.url 2>/dev/null)
|
|
||||||
$(MYOS):
|
```sh
|
||||||
-@git clone $(MYOS_REPOSITORY) $(MYOS)
|
DOMAIN=example.org
|
||||||
|
ENV=master
|
||||||
|
```
|
||||||
|
|
||||||
|
`myos` runs from the current directory: it passes it as `WORKDIR`, so stacks and
|
||||||
|
`.env` are looked up there. A `WORKDIR` set in the config file wins over the current
|
||||||
|
directory, which pins a machine to its deployment directory.
|
||||||
|
|
||||||
|
### As a make include
|
||||||
|
|
||||||
|
Add to your project `Makefile`:
|
||||||
|
|
||||||
|
```make
|
||||||
|
MYOS ?= /usr/local/lib/myos
|
||||||
-include $(MYOS)/make/include.mk
|
-include $(MYOS)/make/include.mk
|
||||||
```
|
```
|
||||||
|
|
||||||
* Call the `make help` command to show available targets.
|
Then `make help` lists the available targets.
|
||||||
|
|
||||||
```
|
### Stack catalogue
|
||||||
$ make help
|
|
||||||
Usage:
|
|
||||||
make [target]
|
|
||||||
|
|
||||||
Targets:
|
myos looks for stacks in `./stack`, `../stack`, `~/.local/share/myos/stack`,
|
||||||
help This help
|
`/usr/local/share/myos/stack` and `/usr/share/myos/stack`:
|
||||||
[...]
|
|
||||||
|
```sh
|
||||||
|
sudo git clone https://github.com/aya/myos-stacks /usr/local/share/myos
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Examples
|
```sh
|
||||||
|
myos up # the stack of the current directory
|
||||||
* Configure myos for domain `domain.tld` and stack `default`
|
myos up STACK=host # a group of stacks, see stack/host/host.mk
|
||||||
|
myos up STACK=host/fabio # a single stack
|
||||||
```shell
|
myos up STACK=postgres:9.6 # a versioned stack
|
||||||
$ make bootstrap DOMAIN=domain.tld STACK=default
|
myos ps
|
||||||
|
myos logs
|
||||||
|
myos config # rendered compose file
|
||||||
|
myos down
|
||||||
|
myos shutdown # every stack: app, host and user
|
||||||
```
|
```
|
||||||
|
|
||||||
* Start myos stack `host`
|
### How a stack is resolved
|
||||||
|
|
||||||
```shell
|
A stack is a directory of compose files. For `STACK=<name>` in environment `ENV`,
|
||||||
$ make host
|
myos loads, in order, whichever of these exist:
|
||||||
```
|
|
||||||
|
|
||||||
`make host` starts the stack `host` with docker host services :
|
|
||||||
- consul (service discovery) on host port 8500
|
|
||||||
- fabio (load balancer) on host ports 80 and 443
|
|
||||||
- registrator (docker/consul bridge)
|
|
||||||
|
|
||||||
* Stop myos
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ make shutdown
|
|
||||||
```
|
|
||||||
|
|
||||||
### Variables
|
|
||||||
|
|
||||||
* DEBUG
|
|
||||||
|
|
||||||
Show executed commands.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ make up DEBUG=true
|
|
||||||
```
|
|
||||||
|
|
||||||
* DRYRUN
|
|
||||||
|
|
||||||
Do nothing, show commands instead of executing it.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ make up DRYRUN=true
|
|
||||||
```
|
|
||||||
|
|
||||||
* VERBOSE
|
|
||||||
|
|
||||||
Show called functions.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ make up VERBOSE=true
|
|
||||||
```
|
|
||||||
|
|
||||||
* Show variable USER
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ make print-USER
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Setup
|
|
||||||
|
|
||||||
* SETUP_LETSENCRYPT
|
|
||||||
|
|
||||||
Generate ${DOMAIN} certificate files with letsencrypt.
|
|
||||||
|
|
||||||
By default, myos generates invalid ${DOMAIN} certificate files with openssl.
|
|
||||||
You can use letsencrypt instead, to generate valid wildcard certificate files.
|
|
||||||
|
|
||||||
To achieve this, you must add following DNS entries to domain ${DOMAIN} to prove you own it:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
_acme-challenge.${DOMAIN} IN CNAME ${DOMAIN}.acme.${DOMAIN}.
|
<name>.yml <name>.<ENV>.yml <ENV>/<name>.yml
|
||||||
acme.${DOMAIN}. IN NS certbot.${DOMAIN}.
|
<name>.<suffix>.yml <name>.<suffix>.<ENV>.yml <name>.<version>.yml
|
||||||
certbot.${DOMAIN}. IN A ${DOCKER_HOST_INET4}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
In this config, DOCKER_HOST_INET4 should be the external IP address of the server running certbot.
|
`<suffix>` comes from the `COMPOSE_FILE_*` variables that are not `false`
|
||||||
Port 53 of this IP address must be reachable from internet and point to this server.
|
(`app`, `labels`, `networks`, `ssh`, `volumes` by default; add e.g.
|
||||||
|
`COMPOSE_FILE_WWW=true` to also load `<name>.www.yml`). The framework always
|
||||||
|
appends its own `share/compose/networks.yml`.
|
||||||
|
|
||||||
If you want a simple DNS configuration to host all your services on the same server, you can setup following DNS config:
|
### Project names and networks
|
||||||
|
|
||||||
```
|
| stack | compose project | meaning |
|
||||||
@ IN A ${DOCKER_HOST_INET4}
|
|---|---|---|
|
||||||
*.${DOMAIN}. IN CNAME ${DOMAIN}.
|
| `host/*` | `$(HOSTNAME)` | one instance per machine: ports 80/443, consul, certbot |
|
||||||
_acme-challenge.${DOMAIN} IN CNAME ${DOMAIN}.acme.${DOMAIN}.
|
| `User/*` | user identity | one instance per user |
|
||||||
acme.${DOMAIN}. IN NS ${DOMAIN}.
|
| anything else | `<user>-<app>-<env>` | many instances per machine |
|
||||||
|
|
||||||
|
Networks: `default` = `_<project>` (private to the project), `private` =
|
||||||
|
`<user>-<env>` and `public` = `<hostname>`, both external and created on demand.
|
||||||
|
|
||||||
|
## Variables
|
||||||
|
|
||||||
|
| variable | effect |
|
||||||
|
|---|---|
|
||||||
|
| `DEBUG=true` | show executed commands |
|
||||||
|
| `DRYRUN=true` | print commands instead of running them |
|
||||||
|
| `VERBOSE=true` | show called functions |
|
||||||
|
| `ENV=<env>` | environment: selects `.env.<env>` and the `<name>.<env>.yml` overlays |
|
||||||
|
| `STACK=<refs>` | stacks to act on |
|
||||||
|
| `SERVICE=<name>` | target one compose service (`exec`, `run`, `logs`, `scale`) |
|
||||||
|
|
||||||
|
```sh
|
||||||
|
myos print-COMPOSE_FILE # show a variable
|
||||||
|
myos print-COMPOSE_PROJECT_NAME
|
||||||
|
myos debug # show debug variables
|
||||||
|
myos doc # self documentation from the make comments
|
||||||
```
|
```
|
||||||
|
|
||||||
This will point domain ${DOMAIN} to the IP address ${DOCKER_HOST_INET4} of this server, and point all subdomains *.{DOMAIN} to the ip address pointed by ${DOMAIN}.
|
`SETUP_UFW=true` enables the ufw/ufw-docker integration (`myos setup-ufw`).
|
||||||
|
|
||||||
At this point, you should be able to generate a valid certificate for *.${DOMAIN} using certbot [dns standalone](https://github.com/siilike/certbot-dns-standalone) plugin.
|
## Tests
|
||||||
This task is done automatically when creating the host stack if SETUP_LETSENCRYPT variable is not empty.
|
|
||||||
|
|
||||||
If you already launched myos host stack before, the ${DOMAIN} certificates has been automatically generated by openssl and you should remove them before trying to generate them with letsencrypt.
|
```sh
|
||||||
|
make test # shellspec: unit + golden (a mocked docker, no daemon needed)
|
||||||
```
|
make test-golden # golden only
|
||||||
$ make host-down
|
make golden-record # re-record the golden expectations
|
||||||
$ docker volume rm $(hostname)
|
make lint # shellcheck
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then test the letsencrypt certificate generation using DEBUG mode that force to use the letsencrypt staging server.
|
## License
|
||||||
|
|
||||||
```
|
|
||||||
$ make host SETUP_LETSENCRYPT=true DEBUG=true
|
|
||||||
```
|
|
||||||
|
|
||||||
If letsencrypt certificate generation fails, you can retry the generation of a staging certificate.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make host-certbot-staging
|
|
||||||
```
|
|
||||||
|
|
||||||
Once the certificate generation is working, you can ask for a valid certificate.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make host-down
|
|
||||||
$ docker volume rm $(hostname)
|
|
||||||
$ make host SETUP_LETSENCRYPT=true
|
|
||||||
```
|
|
||||||
|
|
||||||
* SETUP_UFW
|
|
||||||
|
|
||||||
Control linux firewall rules with ufw.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ echo SETUP_UFW=true >> .env
|
|
||||||
$ make setup-ufw
|
|
||||||
```
|
|
||||||
|
|
||||||
### Debug
|
|
||||||
|
|
||||||
* Show docker compose yaml config
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ make config
|
|
||||||
```
|
|
||||||
|
|
||||||
`make config` show docker compose yaml config for stack `STACK`
|
|
||||||
`make host-config` show docker compose yaml config for stack `host`
|
|
||||||
`make user-config` show docker compose yaml config for stack `User`
|
|
||||||
`make stack-elastic-config` show docker compose yaml config for stack `elastic`
|
|
||||||
|
|
||||||
* Show debug variables
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ make debug
|
|
||||||
```
|
|
||||||
|
|
||||||
* Generate self documentation
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ make doc
|
|
||||||
```
|
|
||||||
|
|
||||||
* Show env args
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ make print-env_args
|
|
||||||
```
|
|
||||||
|
|
||||||
* Show user mail
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ make print-MAIL
|
|
||||||
```
|
|
||||||
|
|
||||||
|
GPL-3.0, see LICENSE.
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
FROM alpine:latest as dist
|
|
||||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
|
|
||||||
ARG COMPOSE_REMOTE=https://github.com/docker/compose
|
|
||||||
ARG COMPOSE_VERSION=2.5.0
|
|
||||||
ARG DOCKER_MACHINE=x86_64
|
|
||||||
ARG DOCKER_SYSTEM=Linux
|
|
||||||
|
|
||||||
RUN apk update \
|
|
||||||
&& apk add --no-cache ca-certificates \
|
|
||||||
&& OS="$(echo ${DOCKER_SYSTEM} |awk '{print tolower($0)}')" \
|
|
||||||
&& ARCH="$(echo ${DOCKER_MACHINE} |awk '{print /armv7l/ ? "armv7" : $0}')" \
|
|
||||||
&& wget -qO /usr/bin/docker-compose ${COMPOSE_REMOTE}/releases/download/v${COMPOSE_VERSION}/docker-compose-${OS}-${ARCH} \
|
|
||||||
&& chmod +x /usr/bin/docker-compose
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/docker-compose"]
|
|
||||||
|
|
||||||
FROM dist as master
|
|
||||||
ARG DOCKER_BUILD_DIR
|
|
||||||
@@ -43,7 +43,7 @@ DOCKER_COMPOSE_RUN_WORKDIR ?= $(if $(DOCKER_COMPOSE_WORKDIR),-w $(DOCKER_CO
|
|||||||
DOCKER_COMPOSE_SERVICE_NAME ?= $(subst _,-,$(DOCKER_COMPOSE_PROJECT_NAME))
|
DOCKER_COMPOSE_SERVICE_NAME ?= $(subst _,-,$(DOCKER_COMPOSE_PROJECT_NAME))
|
||||||
DOCKER_COMPOSE_UP_OPTIONS ?= -d
|
DOCKER_COMPOSE_UP_OPTIONS ?= -d
|
||||||
DOCKER_IMAGE_TAG ?= $(if $(filter true,$(DEPLOY)),$(if $(filter $(ENV),$(ENV_DEPLOY)),$(VERSION)),$(if $(DRONE_BUILD_NUMBER),$(DRONE_BUILD_NUMBER),latest))
|
DOCKER_IMAGE_TAG ?= $(if $(filter true,$(DEPLOY)),$(if $(filter $(ENV),$(ENV_DEPLOY)),$(VERSION)),$(if $(DRONE_BUILD_NUMBER),$(DRONE_BUILD_NUMBER),latest))
|
||||||
DOCKER_IMAGES ?= $(patsubst %/,%,$(patsubst docker/%,%,$(dir $(wildcard docker/*/Dockerfile))))
|
DOCKER_IMAGES ?= $(foreach dir,$(DOCKER_DIR),$(patsubst $(dir)/%/Dockerfile,%,$(wildcard $(dir)/*/Dockerfile)))
|
||||||
DOCKER_PLUGIN ?= rexray/s3fs:latest
|
DOCKER_PLUGIN ?= rexray/s3fs:latest
|
||||||
DOCKER_PLUGIN_ARGS ?= $(foreach var,$(DOCKER_PLUGIN_VARS),$(if $(DOCKER_PLUGIN_$(var)),$(var)='$(DOCKER_PLUGIN_$(var))'))
|
DOCKER_PLUGIN_ARGS ?= $(foreach var,$(DOCKER_PLUGIN_VARS),$(if $(DOCKER_PLUGIN_$(var)),$(var)='$(DOCKER_PLUGIN_$(var))'))
|
||||||
DOCKER_PLUGIN_OPTIONS ?= --grant-all-permissions
|
DOCKER_PLUGIN_OPTIONS ?= --grant-all-permissions
|
||||||
@@ -109,11 +109,7 @@ define docker-compose
|
|||||||
$(if $(COMPOSE_FILE),
|
$(if $(COMPOSE_FILE),
|
||||||
$(if $(DOCKER_COMPOSE),
|
$(if $(DOCKER_COMPOSE),
|
||||||
$(call env-exec,$(RUN) $(DOCKER_COMPOSE) $(DOCKER_COMPOSE_ARGS) $(patsubst %,-f %,$(COMPOSE_FILE)) -p $(COMPOSE_PROJECT_NAME) $(1))
|
$(call env-exec,$(RUN) $(DOCKER_COMPOSE) $(DOCKER_COMPOSE_ARGS) $(patsubst %,-f %,$(COMPOSE_FILE)) -p $(COMPOSE_PROJECT_NAME) $(1))
|
||||||
, $(if $(DOCKER_RUN),
|
, $(call ERROR,docker compose >= $(COMPOSE_VERSION) not found: install the docker compose plugin or docker-compose)
|
||||||
$(call docker-build,$(call docker-path,compose),docker/compose,$(COMPOSE_VERSION))
|
|
||||||
$(call docker-run,docker/compose:$(COMPOSE_VERSION) $(DOCKER_COMPOSE_ARGS),$(patsubst %,-f %,$(COMPOSE_FILE)) -p $(COMPOSE_PROJECT_NAME) $(1))
|
|
||||||
, $(call env-exec,$(RUN) docker-compose $(DOCKER_COMPOSE_ARGS) $(patsubst %,-f %,$(COMPOSE_FILE)) -p $(COMPOSE_PROJECT_NAME) $(1))
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|||||||
+6
-12
@@ -1,9 +1,9 @@
|
|||||||
##
|
##
|
||||||
# DOCKER
|
# DOCKER
|
||||||
|
|
||||||
# target docker-build: Fire docker-image-myos, Call docker-build-% target for each DOCKER_IMAGES
|
# target docker-build: Call docker-build-% target for each DOCKER_IMAGES
|
||||||
.PHONY: docker-build
|
.PHONY: docker-build
|
||||||
docker-build: docker-image-myos
|
docker-build:
|
||||||
$(foreach image,$(or $(SERVICE),$(DOCKER_IMAGES)),$(call make,docker-build-$(image)))
|
$(foreach image,$(or $(SERVICE),$(DOCKER_IMAGES)),$(call make,docker-build-$(image)))
|
||||||
|
|
||||||
# target docker-build-%: Call docker-build for each Dockerfile in docker/% folder
|
# target docker-build-%: Call docker-build for each Dockerfile in docker/% folder
|
||||||
@@ -27,10 +27,10 @@ docker-commit: stack
|
|||||||
docker-commit-%: stack
|
docker-commit-%: stack
|
||||||
$(foreach service,$(or $(SERVICE),$(SERVICES)),$(call docker-commit,$(service),,,$*))
|
$(foreach service,$(or $(SERVICE),$(SERVICES)),$(call docker-commit,$(service),,,$*))
|
||||||
|
|
||||||
# target docker-compose-build: Fire docker-image-myos, Call docker-compose build SERVICE
|
# target docker-compose-build: Call docker-compose build SERVICE
|
||||||
.PHONY: docker-compose-build
|
.PHONY: docker-compose-build
|
||||||
docker-compose-build: DOCKER_RUN_OPTIONS += -it
|
docker-compose-build: DOCKER_RUN_OPTIONS += -it
|
||||||
docker-compose-build: docker-image-myos stack
|
docker-compose-build: stack
|
||||||
$(call docker-compose,build $(DOCKER_BUILD_ARGS) $(if $(filter $(SERVICE),$(SERVICES)),$(SERVICE)))
|
$(call docker-compose,build $(DOCKER_BUILD_ARGS) $(if $(filter $(SERVICE),$(SERVICES)),$(SERVICE)))
|
||||||
|
|
||||||
# target docker-compose-config: Call docker-compose config
|
# target docker-compose-config: Call docker-compose config
|
||||||
@@ -110,18 +110,12 @@ docker-compose-start: stack
|
|||||||
docker-compose-stop: stack
|
docker-compose-stop: stack
|
||||||
$(call docker-compose,stop $(if $(filter $(SERVICE),$(SERVICES)),$(SERVICE)))
|
$(call docker-compose,stop $(if $(filter $(SERVICE),$(SERVICES)),$(SERVICE)))
|
||||||
|
|
||||||
# target docker-compose-up: Fire docker-image-myos, Call docker-compose up SERVICE
|
# target docker-compose-up: Call docker-compose up SERVICE
|
||||||
.PHONY: docker-compose-up
|
.PHONY: docker-compose-up
|
||||||
docker-compose-up: DOCKER_RUN_OPTIONS += -it
|
docker-compose-up: DOCKER_RUN_OPTIONS += -it
|
||||||
docker-compose-up: docker-image-myos bootstrap-stack stack
|
docker-compose-up: bootstrap-stack stack
|
||||||
$(call docker-compose,up $(DOCKER_COMPOSE_UP_OPTIONS) $(if $(filter $(SERVICE),$(SERVICES)),$(SERVICE)))
|
$(call docker-compose,up $(DOCKER_COMPOSE_UP_OPTIONS) $(if $(filter $(SERVICE),$(SERVICES)),$(SERVICE)))
|
||||||
|
|
||||||
# target docker-image-myos: Call myos-docker-build-% target for each MYOS_DOCKER_IMAGES
|
|
||||||
.PHONY: docker-image-myos
|
|
||||||
docker-image-myos: MAKE_VARS += DOCKER_REPOSITORY STACK
|
|
||||||
docker-image-myos:
|
|
||||||
$(foreach image,$(subst $(quote),,$(MYOS_DOCKER_IMAGES)),$(call make,docker-build-$(image),$(MYOS)))
|
|
||||||
|
|
||||||
# target docker-image-rm: Remove docker images matching DOCKER_REPOSITORY
|
# target docker-image-rm: Remove docker images matching DOCKER_REPOSITORY
|
||||||
.PHONY: docker-image-rm
|
.PHONY: docker-image-rm
|
||||||
docker-image-rm:
|
docker-image-rm:
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ HOST_DOCKER_VOLUME ?= $(HOST_COMPOSE_PROJECT_NAME)
|
|||||||
HOST_GID ?= $(HOST_UID)
|
HOST_GID ?= $(HOST_UID)
|
||||||
HOST_UID ?= 123
|
HOST_UID ?= 123
|
||||||
HOST_STACK ?= $(filter host,$(firstword $(subst /, ,$(STACK))))
|
HOST_STACK ?= $(filter host,$(firstword $(subst /, ,$(STACK))))
|
||||||
MYOS_STACK ?= $(wildcard $(foreach stack_dir,$(STACK_DIR),$(stack_dir)/myos))
|
MYOS_STACK ?= $(if $(filter . myos,$(MYOS)),$(realpath $(MYOS)/share/compose))
|
||||||
MYOS_STACK_FILE ?= networks volumes
|
MYOS_STACK_FILE ?= networks volumes
|
||||||
RESU_DOCKER_REPOSITORY ?= $(subst -,/,$(USER_COMPOSE_PROJECT_NAME))
|
RESU_DOCKER_REPOSITORY ?= $(subst -,/,$(USER_COMPOSE_PROJECT_NAME))
|
||||||
SHARE_DIR ?= . .. ~/.local/share /usr/local/share /usr/share
|
SHARE_DIR ?= . .. ~/.local/share /usr/local/share /usr/share
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ include $(filter-out $(wildcard $(MAKE_FILE) $(MAKE_FIRST) $(MAKE_LATEST)),$(wil
|
|||||||
## it includes $(MAKE_DIR)/$(MAKE_SUBDIRS)/*.mk
|
## it includes $(MAKE_DIR)/$(MAKE_SUBDIRS)/*.mk
|
||||||
include $(foreach subdir,$(MAKE_SUBDIRS),$(filter-out $(wildcard $(MAKE_DIR)/$(subdir)/def.mk $(MAKE_DIR)/$(subdir)/def.*.mk),$(wildcard $(MAKE_DIR)/$(subdir)/*.mk)))
|
include $(foreach subdir,$(MAKE_SUBDIRS),$(filter-out $(wildcard $(MAKE_DIR)/$(subdir)/def.mk $(MAKE_DIR)/$(subdir)/def.*.mk),$(wildcard $(MAKE_DIR)/$(subdir)/*.mk)))
|
||||||
## if not in $(MYOS) nor $(MONOREPO), it includes def.mk def.*.mk */def.mk */def.*.mk *.mk */*.mk
|
## if not in $(MYOS) nor $(MONOREPO), it includes def.mk def.*.mk */def.mk */def.*.mk *.mk */*.mk
|
||||||
include $(if $(filter-out . myos,$(MYOS)),$(wildcard def.mk def.*.mk */def.mk */def.*.mk) $(filter-out $(wildcard def.mk def.*.mk */def.mk */def.*.mk stack/*.mk),$(wildcard *.mk */*.mk)))
|
include $(if $(filter-out . myos,$(MYOS)),$(wildcard def.mk def.*.mk */def.mk */def.*.mk) $(filter-out $(wildcard def.mk def.*.mk */def.mk */def.*.mk $(STACK_DIR_NAME)/*.mk),$(wildcard *.mk */*.mk)))
|
||||||
## it includes $(STACK_DIR)/*.mk $(STACK_DIR)/*/*.mk
|
## it includes $(STACK_DIR)/*.mk $(STACK_DIR)/*/*.mk
|
||||||
include $(foreach stack_dir,$(STACK_DIR),$(wildcard $(stack_dir)/*.mk $(stack_dir)/*/*.mk))
|
include $(foreach stack_dir,$(STACK_DIR),$(wildcard $(stack_dir)/*.mk $(stack_dir)/*/*.mk))
|
||||||
## it includes $(MAKE_LATEST)
|
## it includes $(MAKE_LATEST)
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
make -o docker-stack-config MAKE_OLDFILE=docker-stack-config ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-config STACK=myos APP_NAME=myos
|
make -o docker-stack-config MAKE_OLDFILE=docker-stack-config ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-config STACK=myos APP_NAME=myos
|
||||||
docker --log-level=error compose --ansi=auto -f @MYOS@/stack/myos/networks.yml -p tester-myos-local config
|
docker --log-level=error compose --ansi=auto -f @MYOS@/share/compose/networks.yml -p tester-myos-local config
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
make -o docker-stack-down MAKE_OLDFILE=docker-stack-down ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-down STACK=myos APP_NAME=myos
|
make -o docker-stack-down MAKE_OLDFILE=docker-stack-down ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-down STACK=myos APP_NAME=myos
|
||||||
docker --log-level=error compose --ansi=auto -f @MYOS@/stack/myos/networks.yml -p tester-myos-local down
|
docker --log-level=error compose --ansi=auto -f @MYOS@/share/compose/networks.yml -p tester-myos-local down
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
COMPOSE_FILE @MYOS@/stack/myos/networks.yml
|
COMPOSE_FILE @MYOS@/share/compose/networks.yml
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
docker --log-level=error compose --ansi=auto -f @MYOS@/stack/myos/networks.yml -p tester-myos-local run --rm app id
|
docker --log-level=error compose --ansi=auto -f @MYOS@/share/compose/networks.yml -p tester-myos-local run --rm app id
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
make -o docker-stack-scale MAKE_OLDFILE=docker-stack-scale ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-scale STACK=myos APP_NAME=myos
|
make -o docker-stack-scale MAKE_OLDFILE=docker-stack-scale ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-scale STACK=myos APP_NAME=myos
|
||||||
docker --log-level=error compose --ansi=auto -f @MYOS@/stack/myos/networks.yml -p tester-myos-local up -d --scale app=2
|
docker --log-level=error compose --ansi=auto -f @MYOS@/share/compose/networks.yml -p tester-myos-local up -d --scale app=2
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=master DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=myos APP_NAME=myos
|
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=master DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=myos APP_NAME=myos
|
||||||
sh -c docker network create tester-master >/dev/null 2>&1
|
sh -c docker network create tester-master >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @MYOS@/stack/myos/networks.yml -p tester-myos-master up -d
|
docker --log-level=error compose --ansi=auto -f @MYOS@/share/compose/networks.yml -p tester-myos-master up -d
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=myos APP_NAME=myos
|
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=myos APP_NAME=myos
|
||||||
sh -c docker network create tester-local >/dev/null 2>&1
|
sh -c docker network create tester-local >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @MYOS@/stack/myos/networks.yml -p tester-myos-local up -d
|
docker --log-level=error compose --ansi=auto -f @MYOS@/share/compose/networks.yml -p tester-myos-local up -d
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=default APP_NAME=default
|
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=default APP_NAME=default
|
||||||
sh -c docker network create tester-local >/dev/null 2>&1
|
sh -c docker network create tester-local >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @HOME@/.local/share/myos/stack/postgres/postgres.yml -f @HOME@/.local/share/myos/stack/postgres/postgres.local.yml -f @HOME@/.local/share/myos/stack/redis/redis.yml -f @MYOS@/stack/myos/networks.yml -p tester-default-local up -d
|
docker --log-level=error compose --ansi=auto -f @HOME@/.local/share/myos/stack/postgres/postgres.yml -f @HOME@/.local/share/myos/stack/postgres/postgres.local.yml -f @HOME@/.local/share/myos/stack/redis/redis.yml -f @MYOS@/share/compose/networks.yml -p tester-default-local up -d
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=testing APP_NAME=testing
|
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=testing APP_NAME=testing
|
||||||
sh -c docker network create tester-local >/dev/null 2>&1
|
sh -c docker network create tester-local >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @HOME@/.local/share/myos/stack/drone/drone.yml -f @HOME@/.local/share/myos/stack/redis/redis.yml -f @MYOS@/stack/myos/networks.yml -p tester-testing-local up -d
|
docker --log-level=error compose --ansi=auto -f @HOME@/.local/share/myos/stack/drone/drone.yml -f @HOME@/.local/share/myos/stack/redis/redis.yml -f @MYOS@/share/compose/networks.yml -p tester-testing-local up -d
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
COMPOSE_FILE @HOME@/.local/share/myos/stack/drone/drone.yml @HOME@/.local/share/myos/stack/redis/redis.yml @MYOS@/stack/myos/networks.yml
|
COMPOSE_FILE @HOME@/.local/share/myos/stack/drone/drone.yml @HOME@/.local/share/myos/stack/redis/redis.yml @MYOS@/share/compose/networks.yml
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
COMPOSE_FILE @HOME@/.local/share/myos/stack/host/nginx.yml @HOME@/.local/share/myos/stack/host/nginx.www.yml @HOME@/.local/share/myos/stack/host/nginx.dns.yml @MYOS@/stack/myos/networks.yml @MYOS@/stack/myos/volumes.www.local.yml @MYOS@/stack/myos/volumes.dns.local.yml
|
COMPOSE_FILE @HOME@/.local/share/myos/stack/host/nginx.yml @HOME@/.local/share/myos/stack/host/nginx.www.yml @HOME@/.local/share/myos/stack/host/nginx.dns.yml @MYOS@/share/compose/networks.yml @MYOS@/share/compose/volumes.www.local.yml @MYOS@/share/compose/volumes.dns.local.yml
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
COMPOSE_FILE @HOME@/.local/share/myos/stack/host/nginx.yml @HOME@/.local/share/myos/stack/host/nginx.www.yml @MYOS@/stack/myos/networks.yml @MYOS@/stack/myos/volumes.www.local.yml
|
COMPOSE_FILE @HOME@/.local/share/myos/stack/host/nginx.yml @HOME@/.local/share/myos/stack/host/nginx.www.yml @MYOS@/share/compose/networks.yml @MYOS@/share/compose/volumes.www.local.yml
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
COMPOSE_FILE @HOME@/.local/share/myos/stack/postgres/postgres.yml @HOME@/.local/share/myos/stack/postgres/postgres.local.yml @MYOS@/stack/myos/networks.yml
|
COMPOSE_FILE @HOME@/.local/share/myos/stack/postgres/postgres.yml @HOME@/.local/share/myos/stack/postgres/postgres.local.yml @MYOS@/share/compose/networks.yml
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
COMPOSE_FILE @HOME@/.local/share/myos/stack/postgres/postgres.yml @MYOS@/stack/myos/networks.yml
|
COMPOSE_FILE @HOME@/.local/share/myos/stack/postgres/postgres.yml @MYOS@/share/compose/networks.yml
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=postgres APP_NAME=postgres
|
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=postgres APP_NAME=postgres
|
||||||
sh -c docker network create tester-local >/dev/null 2>&1
|
sh -c docker network create tester-local >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @HOME@/.local/share/myos/stack/postgres/postgres.yml -f @HOME@/.local/share/myos/stack/postgres/postgres.local.yml -f @MYOS@/stack/myos/networks.yml -p tester-postgres-local up -d
|
docker --log-level=error compose --ansi=auto -f @HOME@/.local/share/myos/stack/postgres/postgres.yml -f @HOME@/.local/share/myos/stack/postgres/postgres.local.yml -f @MYOS@/share/compose/networks.yml -p tester-postgres-local up -d
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
COMPOSE_FILE @MYOS@/stack/myos/networks.yml
|
COMPOSE_FILE @MYOS@/share/compose/networks.yml
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
COMPOSE_FILE @HOME@/.local/share/myos/stack/User/User.yml @MYOS@/stack/myos/networks.yml
|
COMPOSE_FILE @HOME@/.local/share/myos/stack/User/User.yml @MYOS@/share/compose/networks.yml
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
make -o docker-stack-config MAKE_OLDFILE=docker-stack-config ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-config STACK=host/fabio APP_NAME=host
|
make -o docker-stack-config MAKE_OLDFILE=docker-stack-config ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-config STACK=host/fabio APP_NAME=host
|
||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/fabio.yml -f @MYOS@/stack/myos/networks.yml -p testhost config
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/fabio.yml -f @MYOS@/share/compose/networks.yml -p testhost config
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
make -o docker-stack-down MAKE_OLDFILE=docker-stack-down ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-down STACK=host APP_NAME=host
|
make -o docker-stack-down MAKE_OLDFILE=docker-stack-down ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-down STACK=host APP_NAME=host
|
||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @WD@/stack/host/fabio.yml -f @WD@/stack/host/registrator.yml -f @MYOS@/stack/myos/networks.yml -p testhost down
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @WD@/stack/host/fabio.yml -f @WD@/stack/host/registrator.yml -f @MYOS@/share/compose/networks.yml -p testhost down
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
COMPOSE_FILE @WD@/stack/host/consul.yml @MYOS@/stack/myos/networks.yml
|
COMPOSE_FILE @WD@/stack/host/consul.yml @MYOS@/share/compose/networks.yml
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @MYOS@/stack/myos/networks.yml -p testhost exec -T consul sh -c consul members
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @MYOS@/share/compose/networks.yml -p testhost exec -T consul sh -c consul members
|
||||||
/bin/bash: -c: line 0: syntax error near unexpected token `||'
|
/bin/bash: -c: line 0: syntax error near unexpected token `||'
|
||||||
/bin/bash: -c: line 0: `|| true'
|
/bin/bash: -c: line 0: `|| true'
|
||||||
make: *** [exec] Error 2
|
make: *** [exec] Error 2
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
make -o docker-stack-logs MAKE_OLDFILE=docker-stack-logs ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-logs STACK=host/consul APP_NAME=host
|
make -o docker-stack-logs MAKE_OLDFILE=docker-stack-logs ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-logs STACK=host/consul APP_NAME=host
|
||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @MYOS@/stack/myos/networks.yml -p testhost logs --follow --tail=100
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @MYOS@/share/compose/networks.yml -p testhost logs --follow --tail=100
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
COMPOSE_FILE @WD@/stack/host/consul.yml @MYOS@/stack/myos/networks.yml
|
COMPOSE_FILE @WD@/stack/host/consul.yml @MYOS@/share/compose/networks.yml
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
STACK_DIR @MYOS@/stack @HOME@/.local/share/myos/stack @WD@/stack
|
STACK_DIR @HOME@/.local/share/myos/stack @WD@/stack
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
make -o docker-stack-ps MAKE_OLDFILE=docker-stack-ps ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-ps STACK=host/consul APP_NAME=host
|
make -o docker-stack-ps MAKE_OLDFILE=docker-stack-ps ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-ps STACK=host/consul APP_NAME=host
|
||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @MYOS@/stack/myos/networks.yml -p testhost ps
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @MYOS@/share/compose/networks.yml -p testhost ps
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
make -o stack-host-config MAKE_OLDFILE=stack-host-config ENV=local DOCKER_COMPOSE=docker --log-level=error compose COMPOSE_IGNORE_ORPHANS=true host=host/consul host/fabio host/registrator config STACK=host
|
make -o stack-host-config MAKE_OLDFILE=stack-host-config ENV=local DOCKER_COMPOSE=docker --log-level=error compose COMPOSE_IGNORE_ORPHANS=true host=host/consul host/fabio host/registrator config STACK=host
|
||||||
make -o stack-host-config MAKE_OLDFILE=stack-host-config ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-config STACK=host APP_NAME=host
|
make -o stack-host-config MAKE_OLDFILE=stack-host-config ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-config STACK=host APP_NAME=host
|
||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @WD@/stack/host/fabio.yml -f @WD@/stack/host/registrator.yml -f @MYOS@/stack/myos/networks.yml -p testhost config
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @WD@/stack/host/fabio.yml -f @WD@/stack/host/registrator.yml -f @MYOS@/share/compose/networks.yml -p testhost config
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ make -o host MAKE_OLDFILE=host ENV=local DOCKER_COMPOSE=docker --log-level=error
|
|||||||
make -o host MAKE_OLDFILE=host ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host/consul APP_NAME=host
|
make -o host MAKE_OLDFILE=host ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host/consul APP_NAME=host
|
||||||
sh -c docker network create tester-local >/dev/null 2>&1
|
sh -c docker network create tester-local >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @MYOS@/stack/myos/networks.yml -p testhost up -d
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @MYOS@/share/compose/networks.yml -p testhost up -d
|
||||||
make -o host MAKE_OLDFILE=host ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host/fabio APP_NAME=host
|
make -o host MAKE_OLDFILE=host ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host/fabio APP_NAME=host
|
||||||
sh -c docker network create tester-local >/dev/null 2>&1
|
sh -c docker network create tester-local >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/fabio.yml -f @MYOS@/stack/myos/networks.yml -p testhost up -d
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/fabio.yml -f @MYOS@/share/compose/networks.yml -p testhost up -d
|
||||||
make -o host MAKE_OLDFILE=host ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host/registrator APP_NAME=host
|
make -o host MAKE_OLDFILE=host ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host/registrator APP_NAME=host
|
||||||
sh -c docker network create tester-local >/dev/null 2>&1
|
sh -c docker network create tester-local >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/registrator.yml -f @MYOS@/stack/myos/networks.yml -p testhost up -d
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/registrator.yml -f @MYOS@/share/compose/networks.yml -p testhost up -d
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host/consul APP_NAME=host
|
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host/consul APP_NAME=host
|
||||||
sh -c docker network create tester-local >/dev/null 2>&1
|
sh -c docker network create tester-local >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @MYOS@/stack/myos/networks.yml -p testhost up -d
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @MYOS@/share/compose/networks.yml -p testhost up -d
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host APP_NAME=host
|
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host APP_NAME=host
|
||||||
sh -c docker network create tester-local >/dev/null 2>&1
|
sh -c docker network create tester-local >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @WD@/stack/host/fabio.yml -f @WD@/stack/host/registrator.yml -f @MYOS@/stack/myos/networks.yml -p testhost up -d
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @WD@/stack/host/fabio.yml -f @WD@/stack/host/registrator.yml -f @MYOS@/share/compose/networks.yml -p testhost up -d
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host/consul APP_NAME=host
|
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host/consul APP_NAME=host
|
||||||
sh -c docker network create tester-local >/dev/null 2>&1
|
sh -c docker network create tester-local >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @WD@/stack/host/fabio.yml -f @MYOS@/stack/myos/networks.yml -p testhost up -d
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @WD@/stack/host/fabio.yml -f @MYOS@/share/compose/networks.yml -p testhost up -d
|
||||||
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host/fabio APP_NAME=host
|
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=host/fabio APP_NAME=host
|
||||||
sh -c docker network create tester-local >/dev/null 2>&1
|
sh -c docker network create tester-local >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @WD@/stack/host/fabio.yml -f @MYOS@/stack/myos/networks.yml -p testhost up -d
|
docker --log-level=error compose --ansi=auto -f @WD@/stack/host/consul.yml -f @WD@/stack/host/fabio.yml -f @MYOS@/share/compose/networks.yml -p testhost up -d
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ DOCKER_SOCKET_LOCATION /var/run/docker.sock
|
|||||||
DOCKER_SYSTEM Linux
|
DOCKER_SYSTEM Linux
|
||||||
DOMAIN example.test
|
DOMAIN example.test
|
||||||
APP myos
|
APP myos
|
||||||
APPS c411 dsh myos wbr wbr.old
|
APPS @APPS@
|
||||||
BRANCH lightning
|
BRANCH @BRANCH@
|
||||||
VERSION legacy-1.0-beta
|
VERSION @VERSION@
|
||||||
RELEASE
|
RELEASE
|
||||||
COMPOSE_FILE @MYOS@/stack/myos/networks.yml
|
COMPOSE_FILE @MYOS@/share/compose/networks.yml
|
||||||
DOCKER_REPOSITORY tester/myos/local
|
DOCKER_REPOSITORY tester/myos/local
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=myos APP_NAME=myos
|
make -o docker-stack-up MAKE_OLDFILE=docker-stack-up ENV=local DOCKER_COMPOSE=docker --log-level=error compose docker-compose-up STACK=myos APP_NAME=myos
|
||||||
sh -c docker network create tester-local >/dev/null 2>&1
|
sh -c docker network create tester-local >/dev/null 2>&1
|
||||||
sh -c docker network create testhost >/dev/null 2>&1
|
sh -c docker network create testhost >/dev/null 2>&1
|
||||||
docker --log-level=error compose --ansi=auto -f @MYOS@/stack/myos/networks.yml -p tester-myos-local up -d
|
docker --log-level=error compose --ansi=auto -f @MYOS@/share/compose/networks.yml -p tester-myos-local up -d
|
||||||
[exit 0]
|
[exit 0]
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ myos_hermetic_env() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# myos_normalize SANDBOX (stdin -> stdout)
|
# myos_normalize SANDBOX (stdin -> stdout)
|
||||||
|
# APPS, BRANCH and VERSION depend on where the myos checkout lives and on its git state,
|
||||||
|
# so they are masked to keep the goldens reproducible across machines.
|
||||||
myos_normalize() {
|
myos_normalize() {
|
||||||
sed -e 's/\x1b\[[0-9;]*m//g' \
|
sed -e 's/\x1b\[[0-9;]*m//g' \
|
||||||
-e "s#$MYOS_ROOT#@MYOS@#g" \
|
-e "s#$MYOS_ROOT#@MYOS@#g" \
|
||||||
@@ -34,6 +36,9 @@ myos_normalize() {
|
|||||||
-e "s#$1/home#@HOME@#g" \
|
-e "s#$1/home#@HOME@#g" \
|
||||||
-e "s#$1#@TMP@#g" \
|
-e "s#$1#@TMP@#g" \
|
||||||
-e 's#/[^ ]*/bin/make#make#g' \
|
-e 's#/[^ ]*/bin/make#make#g' \
|
||||||
|
-e 's/^APPS .*/APPS @APPS@/' \
|
||||||
|
-e 's/^BRANCH .*/BRANCH @BRANCH@/' \
|
||||||
|
-e 's/^VERSION .*/VERSION @VERSION@/' \
|
||||||
-e 's/[[:space:]][[:space:]]*/ /g' \
|
-e 's/[[:space:]][[:space:]]*/ /g' \
|
||||||
-e 's/[[:space:]]*$//'
|
-e 's/[[:space:]]*$//'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user