Ensure the base Docker image is rebuilt when running complement with workers. (#10686)
We now always rebuild the matrixdotorg/synapse image, then build the matrixdotorg/synapse-workers image on top of it.pull/10706/head
parent
7367473f96
commit
882539e423
|
@ -0,0 +1 @@
|
||||||
|
Update `complement.sh` to rebuild the base Docker image when run with workers.
|
|
@ -35,25 +35,25 @@ if [[ -z "$COMPLEMENT_DIR" ]]; then
|
||||||
echo "Checkout available at 'complement-master'"
|
echo "Checkout available at 'complement-master'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Build the base Synapse image from the local checkout
|
||||||
|
docker build -t matrixdotorg/synapse -f "docker/Dockerfile" .
|
||||||
|
|
||||||
# If we're using workers, modify the docker files slightly.
|
# If we're using workers, modify the docker files slightly.
|
||||||
if [[ -n "$WORKERS" ]]; then
|
if [[ -n "$WORKERS" ]]; then
|
||||||
BASE_IMAGE=matrixdotorg/synapse-workers
|
# Build the workers docker image (from the base Synapse image).
|
||||||
BASE_DOCKERFILE=docker/Dockerfile-workers
|
docker build -t matrixdotorg/synapse-workers -f "docker/Dockerfile-workers" .
|
||||||
|
|
||||||
export COMPLEMENT_BASE_IMAGE=complement-synapse-workers
|
export COMPLEMENT_BASE_IMAGE=complement-synapse-workers
|
||||||
COMPLEMENT_DOCKERFILE=SynapseWorkers.Dockerfile
|
COMPLEMENT_DOCKERFILE=SynapseWorkers.Dockerfile
|
||||||
# And provide some more configuration to complement.
|
# And provide some more configuration to complement.
|
||||||
export COMPLEMENT_CA=true
|
export COMPLEMENT_CA=true
|
||||||
export COMPLEMENT_VERSION_CHECK_ITERATIONS=500
|
export COMPLEMENT_VERSION_CHECK_ITERATIONS=500
|
||||||
else
|
else
|
||||||
BASE_IMAGE=matrixdotorg/synapse
|
|
||||||
BASE_DOCKERFILE=docker/Dockerfile
|
|
||||||
export COMPLEMENT_BASE_IMAGE=complement-synapse
|
export COMPLEMENT_BASE_IMAGE=complement-synapse
|
||||||
COMPLEMENT_DOCKERFILE=Synapse.Dockerfile
|
COMPLEMENT_DOCKERFILE=Synapse.Dockerfile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build the base Synapse image from the local checkout
|
# Build the Complement image from the Synapse image we just built.
|
||||||
docker build -t $BASE_IMAGE -f "$BASE_DOCKERFILE" .
|
|
||||||
# Build the Synapse monolith image from Complement, based on the above image we just built
|
|
||||||
docker build -t $COMPLEMENT_BASE_IMAGE -f "$COMPLEMENT_DIR/dockerfiles/$COMPLEMENT_DOCKERFILE" "$COMPLEMENT_DIR/dockerfiles"
|
docker build -t $COMPLEMENT_BASE_IMAGE -f "$COMPLEMENT_DIR/dockerfiles/$COMPLEMENT_DOCKERFILE" "$COMPLEMENT_DIR/dockerfiles"
|
||||||
|
|
||||||
cd "$COMPLEMENT_DIR"
|
cd "$COMPLEMENT_DIR"
|
||||||
|
|
Loading…
Reference in New Issue