Skip to content

Commit

Permalink
ci(Makefile): unify Instill Core instance host (#399)
Browse files Browse the repository at this point in the history
Because

- both env variables `CONSOLE_URL_HOST` and
`CONSOLE_PUBLIC_API_GATEWAY_HOST` reflect to the Instill Core instance
host, we can actually merge them into one `INSTILL_CORE_HOST` for the
self-host users to deploy with custom hostname.

This commit

- replace the env variables `CONSOLE_URL_HOST` and
`CONSOLE_PUBLIC_API_GATEWAY_HOST` with `INSTILL_CORE_HOST`
  • Loading branch information
pinglin authored Dec 7, 2023
1 parent 0439bb8 commit d3b33bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ K6_VERSION=0.44.0

# Instill Core
INSTILL_CORE_VERSION=0.7.0-alpha
INSTILL_CORE_HOST=localhost

# api-gateway
API_GATEWAY_HOST=api-gateway
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ all: ## Launch all services with their up-to-date release version
-v /var/run/docker.sock:/var/run/docker.sock \
-v $${TMP_CONFIG_DIR}:$${TMP_CONFIG_DIR} \
-v $${SYSTEM_CONFIG_PATH}:$${SYSTEM_CONFIG_PATH} \
-e BUILD=${BUILD} \
--name ${CONTAINER_COMPOSE_NAME}-release \
${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} /bin/sh -c " \
cp /instill-ai/core/.env $${TMP_CONFIG_DIR}/.env && \
cp /instill-ai/core/docker-compose.build.yml $${TMP_CONFIG_DIR}/docker-compose.build.yml && \
cp -r /instill-ai/core/configs/influxdb $${TMP_CONFIG_DIR} && \
/bin/sh -c 'cd /instill-ai/core && make all BUILD=${BUILD} PROJECT=core EDITION=$${EDITION:=local-ce} SYSTEM_CONFIG_PATH=$${SYSTEM_CONFIG_PATH} BUILD_CONFIG_DIR_PATH=$${TMP_CONFIG_DIR} OBSERVE_CONFIG_DIR_PATH=$${TMP_CONFIG_DIR}' && \
/bin/sh -c 'cd /instill-ai/core && make all BUILD=$${BUILD} PROJECT=core EDITION=$${EDITION:=local-ce} INSTILL_CORE_HOST=$${INSTILL_CORE_HOST} SYSTEM_CONFIG_PATH=$${SYSTEM_CONFIG_PATH} BUILD_CONFIG_DIR_PATH=$${TMP_CONFIG_DIR} OBSERVE_CONFIG_DIR_PATH=$${TMP_CONFIG_DIR}' && \
rm -rf $${TMP_CONFIG_DIR}/* \
" && rm -rf $${TMP_CONFIG_DIR}; \
fi
Expand All @@ -64,14 +63,12 @@ latest: ## Lunch all dependent services with their latest codebase
-v /var/run/docker.sock:/var/run/docker.sock \
-v $${TMP_CONFIG_DIR}:$${TMP_CONFIG_DIR} \
-v $${SYSTEM_CONFIG_PATH}:$${SYSTEM_CONFIG_PATH} \
-e BUILD=${BUILD} \
-e PROFILE=${PROFILE} \
--name ${CONTAINER_COMPOSE_NAME}-latest \
${CONTAINER_COMPOSE_IMAGE_NAME}:latest /bin/sh -c " \
cp /instill-ai/core/.env $${TMP_CONFIG_DIR}/.env && \
cp /instill-ai/core/docker-compose.build.yml $${TMP_CONFIG_DIR}/docker-compose.build.yml && \
cp -r /instill-ai/core/configs/influxdb $${TMP_CONFIG_DIR} && \
/bin/sh -c 'cd /instill-ai/core && make latest BUILD=${BUILD} PROJECT=core PROFILE=$${PROFILE} EDITION=$${EDITION:=local-ce:latest} BUILD_CONFIG_DIR_PATH=$${TMP_CONFIG_DIR} SYSTEM_CONFIG_PATH=$${SYSTEM_CONFIG_PATH} OBSERVE_CONFIG_DIR_PATH=$${TMP_CONFIG_DIR}'&& \
/bin/sh -c 'cd /instill-ai/core && make latest PROJECT=core PROFILE=$${PROFILE} EDITION=$${EDITION:=local-ce:latest} INSTILL_CORE_HOST=$${INSTILL_CORE_HOST} SYSTEM_CONFIG_PATH=$${SYSTEM_CONFIG_PATH} BUILD_CONFIG_DIR_PATH=$${TMP_CONFIG_DIR} OBSERVE_CONFIG_DIR_PATH=$${TMP_CONFIG_DIR}'&& \
rm -rf $${TMP_CONFIG_DIR}/* \
" && rm -rf $${TMP_CONFIG_DIR}; \
fi
Expand Down

0 comments on commit d3b33bf

Please sign in to comment.