Commit a3e0e3e6 authored by Jürgen Enge's avatar Jürgen Enge
Browse files

Merge branch 'master' of gitlab.switch.ch:memoriav/memobase-2020/services/histogram

parents 72a81d34 a8a2126c
Pipeline #10399 passed with stages
in 21 minutes and 23 seconds
...@@ -12,7 +12,6 @@ default: ...@@ -12,7 +12,6 @@ default:
- mkdir -p /go/src/gitlab.switch.ch/${CI_PROJECT_NAMESPACE} - mkdir -p /go/src/gitlab.switch.ch/${CI_PROJECT_NAMESPACE}
- ln -s $CI_PROJECT_DIR /go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram - ln -s $CI_PROJECT_DIR /go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram
- cd /go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram - cd /go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram
- go get
.test:lint: .test:lint:
stage: test stage: test
...@@ -100,12 +99,12 @@ webservice:test:build: ...@@ -100,12 +99,12 @@ webservice:test:build:
image: docker:stable image: docker:stable
services: services:
- docker:dind - docker:dind
before_script: # before_script:
- apk update && apk add curl # - apk update && apk add curl
script: script:
- 'curl --location --output ffprobe --header "PRIVATE-TOKEN: $API_ACCESS_TOKEN" "https://gitlab.switch.ch/api/v4/projects/937/jobs/artifacts/master/raw/ffmpeg_build/bin/ffprobe?job=snapshot"' # - 'curl --location --output ffprobe --header "PRIVATE-TOKEN: $API_ACCESS_TOKEN" "https://gitlab.switch.ch/api/v4/projects/937/jobs/artifacts/master/raw/ffmpeg_build/bin/ffprobe?job=snapshot"'
- 'curl --location --output convert --header "PRIVATE-TOKEN: $API_ACCESS_TOKEN" "https://gitlab.switch.ch/api/v4/projects/939/jobs/artifacts/master/raw/im_build/bin/convert?job=v6_9_11"' # - 'curl --location --output convert --header "PRIVATE-TOKEN: $API_ACCESS_TOKEN" "https://gitlab.switch.ch/api/v4/projects/939/jobs/artifacts/master/raw/im_build/bin/convert?job=v6_9_11"'
- 'curl --location --output identify --header "PRIVATE-TOKEN: $API_ACCESS_TOKEN" "https://gitlab.switch.ch/api/v4/projects/939/jobs/artifacts/master/raw/im_build/bin/identify?job=v6_9_11"' # - 'curl --location --output identify --header "PRIVATE-TOKEN: $API_ACCESS_TOKEN" "https://gitlab.switch.ch/api/v4/projects/939/jobs/artifacts/master/raw/im_build/bin/identify?job=v6_9_11"'
- docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASSWORD" "$REGISTRY" - docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASSWORD" "$REGISTRY"
- docker build --pull -t "$IMAGE_TAG" -f "$DOCKERFILE" . - docker build --pull -t "$IMAGE_TAG" -f "$DOCKERFILE" .
- docker push "$IMAGE_TAG" - docker push "$IMAGE_TAG"
......
...@@ -20,21 +20,19 @@ WORKDIR /app ...@@ -20,21 +20,19 @@ WORKDIR /app
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram/bin/app /app COPY --from=builder /go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram/bin/app /app
COPY --from=builder /etc/passwd /etc/passwd COPY --from=builder /etc/passwd /etc/passwd
COPY --from=histogram_builder /go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram/bin/app /usr/bin COPY --from=histogram_builder /go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram/bin/histogram /usr/bin
RUN chmod +x /usr/bin/histogram
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y exiftool && \ apt-get install -y exiftool ffmpeg imagemagick && \
apt-get autoremove -y && \ apt-get autoremove -y && \
apt-get clean apt-get clean
ADD ffprobe /usr/bin/ # ADD ffprobe /usr/bin/
ADD convert /usr/bin/ # ADD convert /usr/bin/
ADD identify /usr/bin/ # ADD identify /usr/bin/
USER appuser USER appuser
ADD web/static/ /app/static EXPOSE 8083
ADD web/template /app/web/template
EXPOSE 81
ENTRYPOINT ["/app/app"] ENTRYPOINT ["/app/app"]
apiVersion: apps/v1
kind: Deployment
metadata:
name: indexer-helper-deployment
namespace: memobase
labels:
app: indexer-helper-app
spec:
selector:
matchLabels:
app: indexer-helper-app
replicas: 1
template:
metadata:
labels:
app: indexer-helper-app
tier: web
spec:
containers:
- name: indexer-helper-container
image: cr.gitlab.switch.ch/memoriav/memobase-2020/services/histogram:latest
ports:
- containerPort: 8083
name: http
protocol: TCP
imagePullPolicy: Always
volumeMounts:
- name: config
mountPath: /app/configs
command: ["/app/app", "-cfg", "/app/configs/histogram.toml"]
restartPolicy: Always
volumes:
- name: config
configMap:
name: indexer-helper-config
apiVersion: v1
kind: Service
metadata:
namespace: memobase
name: indexer-helper-service
labels:
app: indexer-helper-app
spec:
ports:
- port: 8083
selector:
app: indexer-helper-app
tier: web
clusterIP: None
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment