Skip to content
Snippets Groups Projects
Commit 803d82ef authored by Sebastian Karius's avatar Sebastian Karius
Browse files

remove nginx-cors; add tensorflow env

parent 822ce372
No related branches found
No related tags found
No related merge requests found
......@@ -39,13 +39,11 @@ helm-package:
- helm dep build helm/ti-coder
- helm package helm/ti-coder
- helm package helm/ti-lamp
- helm package helm/nginx-cors
artifacts:
paths:
- vdo-ninja-0.1.2.tgz
- ti-coder-0.2.6.tgz
- ti-lamp-0.1.2.tgz
- nginx-cors-0.1.4.tgz
expire_in: 1 hour
helm-publish:
......@@ -62,7 +60,6 @@ helm-publish:
- 'curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@vdo-ninja-0.1.2.tgz" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"'
- 'curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@ti-coder-0.2.6.tgz" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"'
- 'curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@ti-lamp-0.1.2.tgz" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"'
- 'curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@nginx-cors-0.1.4.tgz" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"'
stages:
- build
......
......@@ -37,12 +37,4 @@ services:
dockerfile: Dockerfile
context: ./docker/php-fpm_83
cache_from:
- ${CI_REGISTRY}/studio-r215/containerize/php-fpm:83
nginx-cors:
image: ${CI_REGISTRY}/studio-r215/containerize/nginx-cors:1.0.3
build:
dockerfile: Dockerfile
context: ./docker/nginx-cors
cache_from:
- ${CI_REGISTRY}/studio-r215/containerize/nginx-cors:1.0.3
\ No newline at end of file
- ${CI_REGISTRY}/studio-r215/containerize/php-fpm:83
\ No newline at end of file
......@@ -59,4 +59,7 @@ USER ubuntu
WORKDIR /home/ubuntu
# add .local/bin to PATH to be able to directly call python modules installed by pipx
ENV PATH="${PATH}:/home/ubuntu/.local/bin"
\ No newline at end of file
ENV PATH="${PATH}:/home/ubuntu/.local/bin"
# prevent tensorflow from allocation all vram
ENV TF_FORCE_GPU_ALLOW_GROWTH=true
\ No newline at end of file
......@@ -76,4 +76,7 @@ USER coder
WORKDIR /home/coder
# add .local/bin to PATH to be able to directly call python modules installed by pipx
ENV PATH="${PATH}:/home/coder/.local/bin"
\ No newline at end of file
ENV PATH="${PATH}:/home/coder/.local/bin"
# prevent tensorflow from allocation all vram
ENV TF_FORCE_GPU_ALLOW_GROWTH=true
\ No newline at end of file
FROM nginx:alpine
WORKDIR /etc/nginx
COPY nginx.conf.template nginx.conf.template
CMD [ "/bin/sh" , "-c" , "envsubst < nginx.conf.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'" ]
\ No newline at end of file
server {
listen 80;
location /playground {
add_header Content-Security-Policy "default-src 'self'; connect-src 'self';";
add_header Content-Type text/html;
return 200 '<html><head><title>Playground</title></head><body>Playground</body></html>';
}
location / {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
proxy_pass 'https://${API_URL}/';
}
}
\ No newline at end of file
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
apiVersion: v2
name: nginx-cors
description: Nginx reverse proxy with cors set to *
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.4
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.0.3"
Installed nginx cors * reverse proxy.
https://{{ .Values.url }}
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-cors
labels:
app: nginx-cors
spec:
replicas: 1
selector:
matchLabels:
app: nginx-cors
template:
metadata:
name: nginx-cors
labels:
app: nginx-cors
spec:
containers:
- name: nginx-cors
image: "mcr.informatik.uni-halle.de/studio-r215/containerize/nginx-cors:{{ .Chart.AppVersion }}"
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
env:
- name: API_URL
value: {{ .Values.api }}
ports:
- containerPort: 80
readinessProbe:
httpGet:
path: /playground
port: 80
initialDelaySeconds: 10
periodSeconds: 20
restartPolicy: Always
\ No newline at end of file
{{- if .Values.url }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx-cors-ingress
labels:
app: nginx-cors
spec:
rules:
- host: "{{ .Values.url }}.tikube.informatik.uni-halle.de"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-cors-service
port:
number: 80
{{- end }}
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: nginx-cors-service
labels:
app: nginx-cors
spec:
selector:
app: nginx-cors
ports:
- protocol: TCP
port: 80
targetPort: 80
type: ClusterIP
\ No newline at end of file
# url definiert den URL Prefix für die Anwendung. Wenn url nicht definiert ist, wird der Ingress nicht erstellt.
url: ~
api: ~
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment