THis repository contains a complete configuration to demonstrate the deployment of a multi-build staging environment.
- Docker >= v27.1.2
- Docker compose >= v2.29.2
The previous requirements are not mandatory, those are the versions on which this configuration has been tested.
First you need to initialize the environment and then you can deploy multiple stages and show that changes are only visible to the stage to which they've been applied to.
The command below initializes the environment creating the necessary networks and deploying the proxy.
make init
The command below deploys a stage and it can be used multiple times.
The TAG
parameter is not mandatory and it defaults on the current git branch name.
TAG=my-feature-1 make deploy-stage
For this example The deployed stage will be available via http://my-feature-1.staging.localhost.
In case the same
TAG
value is re-used the existing tagged stage will be updated.
The command below destroyes the stage matching the given TAG
.
The TAG
parameter is not mandatory and it defaults on the current git branch name.
TAG=my-feature-1 make destroy-stage
The command below destroyes all the existing stages
make destroy-stages
The command below destroyes the whole environment (networks, proxy and stages).
make destroy