Cleanup unnecessary Make/Docker files
This commit is contained in:
parent
d44f990c26
commit
74608d6fce
11 changed files with 2 additions and 318 deletions
|
|
@ -8,7 +8,6 @@ WORKDIR ${APP_DIR}
|
|||
COPY . .
|
||||
RUN turbo prune --scope=@digiresilience/metamigo-cli --docker
|
||||
|
||||
|
||||
FROM base AS installer
|
||||
ARG APP_DIR=/opt/metamigo-cli
|
||||
WORKDIR ${APP_DIR}
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
PACKAGE_NAME ?= $(shell jq -r '.name' package.json)
|
||||
PACKAGE_VERSION?= $(shell jq -r '.version' package.json)
|
||||
BUILD_DATE ?=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||
DOCKER_ARGS ?=
|
||||
DOCKER_NS ?= registry.gitlab.com/digiresilience/link/link-stack/metamigo
|
||||
DOCKER_TAG ?= test
|
||||
DOCKER_BUILD := docker build ${DOCKER_ARGS} --build-arg BUILD_DATE=${BUILD_DATE}
|
||||
DOCKER_BUILD_FRESH := ${DOCKER_BUILD} --pull --no-cache
|
||||
DOCKER_BUILD_ARGS := --build-arg VCS_REF=${CI_COMMIT_SHORT_SHA}
|
||||
DOCKER_PUSH := docker push
|
||||
DOCKER_BUILD_TAG := ${DOCKER_NS}:${DOCKER_TAG}
|
||||
|
||||
.PHONY: .npmrc
|
||||
.EXPORT_ALL_VARIABLES:
|
||||
|
||||
.npmrc:
|
||||
ifdef CI_JOB_TOKEN
|
||||
echo '@guardianproject-ops:registry=https://gitlab.com/api/v4/packages/npm/' > .npmrc
|
||||
echo '@digiresilience:registry=https://gitlab.com/api/v4/packages/npm/' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/projects/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
echo '//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}' >> .npmrc
|
||||
endif
|
||||
|
||||
docker/build: .npmrc
|
||||
DOCKER_BUILDKIT=1 ${DOCKER_BUILD} ${DOCKER_BUILD_ARGS} -t ${DOCKER_BUILD_TAG} ${PWD}
|
||||
|
||||
docker/build-fresh: .npmrc
|
||||
DOCKER_BUILDKIT=1 ${DOCKER_BUILD_FRESH} ${DOCKER_BUILD_ARGS} -t ${DOCKER_BUILD_TAG} ${PWD}
|
||||
|
||||
docker/add-tag:
|
||||
docker pull ${DOCKER_NS}:${DOCKER_TAG}
|
||||
docker tag ${DOCKER_NS}:${DOCKER_TAG} ${DOCKER_NS}:${DOCKER_TAG_NEW}
|
||||
docker push ${DOCKER_NS}:${DOCKER_TAG_NEW}
|
||||
|
||||
docker/push:
|
||||
${DOCKER_PUSH} ${DOCKER_BUILD_TAG}
|
||||
|
||||
docker/build-push: docker/build docker/push
|
||||
docker/build-fresh-push: docker/build-fresh docker/push
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ "$1" == "api" ]]; then
|
||||
echo "docker-entrypoint: starting api server"
|
||||
./cli db -- migrate
|
||||
exec dumb-init ./cli api
|
||||
elif [[ "$1" == "worker" ]]; then
|
||||
echo "docker-entrypoint: starting worker"
|
||||
exec dumb-init ./cli worker
|
||||
elif [[ "$1" == "cli" ]]; then
|
||||
echo "docker-entrypoint: starting frontend"
|
||||
shift 1
|
||||
exec ./cli "$@"
|
||||
else
|
||||
echo "docker-entrypoint: missing argument, one of: api, worker, frontend, cli"
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue