forked from cerc-io/stack-orchestrator
Use CERC_NPM_REGISTRY_URL everywhere (#340)
This commit is contained in:
parent
fcbea7984f
commit
39a54bc62a
@ -84,7 +84,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
|||||||
|
|
||||||
# TODO: make this configurable
|
# TODO: make this configurable
|
||||||
container_build_env = {
|
container_build_env = {
|
||||||
"CERC_NPM_URL": "http://gitea.local:3000/api/packages/cerc-io/npm/",
|
"CERC_NPM_REGISTRY_URL": config("CERC_NPM_REGISTRY_URL", default="http://gitea.local:3000/api/packages/cerc-io/npm/"),
|
||||||
"CERC_NPM_AUTH_TOKEN": config("CERC_NPM_AUTH_TOKEN", default="<token-not-supplied>"),
|
"CERC_NPM_AUTH_TOKEN": config("CERC_NPM_AUTH_TOKEN", default="<token-not-supplied>"),
|
||||||
"CERC_REPO_BASE_DIR": dev_root_path,
|
"CERC_REPO_BASE_DIR": dev_root_path,
|
||||||
"CERC_CONTAINER_BASE_DIR": container_build_dir,
|
"CERC_CONTAINER_BASE_DIR": container_build_dir,
|
||||||
|
@ -7,7 +7,7 @@ ARG USERNAME=node
|
|||||||
ARG NPM_GLOBAL=/usr/local/share/npm-global
|
ARG NPM_GLOBAL=/usr/local/share/npm-global
|
||||||
|
|
||||||
# This container pulls npm packages from a local registry configured via these env vars
|
# This container pulls npm packages from a local registry configured via these env vars
|
||||||
ARG CERC_NPM_URL
|
ARG CERC_NPM_REGISTRY_URL
|
||||||
ARG CERC_NPM_AUTH_TOKEN
|
ARG CERC_NPM_AUTH_TOKEN
|
||||||
|
|
||||||
# Add NPM global to PATH.
|
# Add NPM global to PATH.
|
||||||
@ -49,9 +49,9 @@ COPY ./start-serving-app.sh /scripts
|
|||||||
# RUN su node -c "npm install -g <your-package-list-here>"
|
# RUN su node -c "npm install -g <your-package-list-here>"
|
||||||
|
|
||||||
# Configure the local npm registry
|
# Configure the local npm registry
|
||||||
RUN npm config set @cerc-io:registry ${CERC_NPM_URL} \
|
RUN npm config set @cerc-io:registry ${CERC_NPM_REGISTRY_URL} \
|
||||||
&& npm config set @lirewine:registry ${CERC_NPM_URL} \
|
&& npm config set @lirewine:registry ${CERC_NPM_REGISTRY_URL} \
|
||||||
&& npm config set -- ${CERC_NPM_URL}:_authToken ${CERC_NPM_AUTH_TOKEN}
|
&& npm config set -- ${CERC_NPM_REGISTRY_URL}:_authToken ${CERC_NPM_AUTH_TOKEN}
|
||||||
|
|
||||||
RUN mkdir -p /config
|
RUN mkdir -p /config
|
||||||
COPY ./config.yml /config
|
COPY ./config.yml /config
|
||||||
|
@ -8,4 +8,4 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|||||||
|
|
||||||
docker build -t cerc/laconic-console-host:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile \
|
docker build -t cerc/laconic-console-host:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile \
|
||||||
--add-host gitea.local:host-gateway \
|
--add-host gitea.local:host-gateway \
|
||||||
--build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_URL ${SCRIPT_DIR}
|
--build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_REGISTRY_URL ${SCRIPT_DIR}
|
||||||
|
@ -7,7 +7,7 @@ ARG USERNAME=node
|
|||||||
ARG NPM_GLOBAL=/usr/local/share/npm-global
|
ARG NPM_GLOBAL=/usr/local/share/npm-global
|
||||||
|
|
||||||
# This container pulls npm packages from a local registry configured via these env vars
|
# This container pulls npm packages from a local registry configured via these env vars
|
||||||
ARG CERC_NPM_URL
|
ARG CERC_NPM_REGISTRY_URL
|
||||||
ARG CERC_NPM_AUTH_TOKEN
|
ARG CERC_NPM_AUTH_TOKEN
|
||||||
|
|
||||||
# Add NPM global to PATH.
|
# Add NPM global to PATH.
|
||||||
@ -42,9 +42,9 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
|||||||
# RUN su node -c "npm install -g <your-package-list-here>"
|
# RUN su node -c "npm install -g <your-package-list-here>"
|
||||||
|
|
||||||
# Configure the local npm registry
|
# Configure the local npm registry
|
||||||
RUN npm config set @cerc-io:registry ${CERC_NPM_URL} \
|
RUN npm config set @cerc-io:registry ${CERC_NPM_REGISTRY_URL} \
|
||||||
&& npm config set @lirewine:registry ${CERC_NPM_URL} \
|
&& npm config set @lirewine:registry ${CERC_NPM_REGISTRY_URL} \
|
||||||
&& npm config set -- ${CERC_NPM_URL}:_authToken ${CERC_NPM_AUTH_TOKEN}
|
&& npm config set -- ${CERC_NPM_REGISTRY_URL}:_authToken ${CERC_NPM_AUTH_TOKEN}
|
||||||
|
|
||||||
# TODO: the image at this point could be made a base image for several different CLI images
|
# TODO: the image at this point could be made a base image for several different CLI images
|
||||||
# that install different Node-based CLI commands
|
# that install different Node-based CLI commands
|
||||||
|
@ -8,4 +8,4 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|||||||
|
|
||||||
docker build -t cerc/laconic-registry-cli:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile \
|
docker build -t cerc/laconic-registry-cli:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile \
|
||||||
--add-host gitea.local:host-gateway \
|
--add-host gitea.local:host-gateway \
|
||||||
--build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_URL ${SCRIPT_DIR}
|
--build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_REGISTRY_URL ${SCRIPT_DIR}
|
||||||
|
Loading…
Reference in New Issue
Block a user