openreplay/frontend/build.sh
Rajesh Rajendran 7dcd9c99a6
Move frontend as a separate container (#553)
* chore(frontend): build dockerimage for frontend

* chore(helm): remove frontend files from minio.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* chore(helm): Adding frontend chart

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* chore(helm): remove grafana ingress from community charts

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* chore(helm): removing minio-frontend ingress

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* fix(helm): ingress rewrite

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* chore(build): give priority to env image tag

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* chore(frontend): adding nginx.conf for frontend container

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* chore(helm): disable minio if not used

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2022-06-23 15:53:18 +00:00

32 lines
817 B
Bash

#!/bin/bash
# Script to build api module
# flags to accept:
# ee: build for enterprise edition.
# Default will be OSS build.
# Example
# Usage: IMAGE_TAG=latest DOCKER_REPO=myDockerHubID bash build.sh
git_sha1=${IMAGE_TAG:-$(git rev-parse HEAD)}
ee="false"
check_prereq() {
which docker || {
echo "Docker not installed, please install docker."
exit=1
}
[[ exit -eq 1 ]] && exit 1
}
function build(){
cp .env.sample .env
# Run docker as the same user, else we'll run in to permission issues.
docker build -t ${DOCKER_REPO:-'local'}/frontend:${git_sha1} --platform linux/amd64 --build-arg SERVICE_NAME=$image .
[[ $PUSH_IMAGE -eq 1 ]] && {
docker push ${DOCKER_REPO:-'local'}/frontend:${git_sha1}
}
echo "frotend build completed"
}
check_prereq
build $1