Commit fda83af1 authored by Antoine  Millet's avatar Antoine Millet
Browse files

Updated project to be compatible with new k8s clusters

parent 84a1b981
Pipeline #41885 failed with stages
in 4 minutes and 4 seconds
......@@ -63,7 +63,7 @@ deploy-dev:
variables:
NAMESPACE: ${CI_PROJECT_NAME}-dev
environment:
name: ${CI_PROJECT_NAME}-dev
name: k8sdev-01-${CI_PROJECT_NAME}-dev
url: https://${CI_PROJECT_NAME}-dev.pasteur.cloud
script:
- sh ci/deploy/deploy.sh
......@@ -79,7 +79,7 @@ deploy-prod:
variables:
NAMESPACE: ${CI_PROJECT_NAME}
environment:
name: ${CI_PROJECT_NAME}
name: k8sprod-02-${CI_PROJECT_NAME}
url: https://${CI_PROJECT_NAME}.pasteur.cloud
script:
- sh ci/deploy/deploy.sh
......
......@@ -51,6 +51,9 @@ spec:
value: "8000"
- name: ALLOWED_HOSTS
value: "${NAMESPACE}.pasteur.cloud"
securityContext:
runAsUser: 1000
runAsGroup: 1000
ports:
- containerPort: 8000
resources:
......@@ -67,7 +70,7 @@ spec:
image: $CI_REGISTRY_IMAGE/django-static:${CI_COMMIT_REF_NAME}
imagePullPolicy: Always
ports:
- containerPort: 80
- containerPort: 8080
resources:
requests:
memory: "64Mi"
......@@ -103,6 +106,6 @@ spec:
- name: django-static
protocol: TCP
port: 8080
targetPort: 80
targetPort: 8080
selector:
app: backend
......@@ -22,7 +22,7 @@ spec:
- name: NODE_ENV
value: "production"
ports:
- containerPort: 80
- containerPort: 8080
resources:
requests:
memory: "128Mi"
......
......@@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
kubernetes.io/ingress.class: internal
labels:
app: metagenedb
name: metagenedb
......
......@@ -30,6 +30,8 @@ spec:
app: postgresql
tier: postgreSQL
spec:
securityContext:
fsGroup: 70
containers:
- name: postgresql
image: postgres:11.4-alpine
......@@ -49,6 +51,9 @@ spec:
secretKeyRef:
name: postgresql-credentials
key: password
securityContext:
runAsUser: 70
runAsGroup: 70
ports:
- containerPort: 5432
name: postgresql
......
......@@ -26,6 +26,9 @@ spec:
memory: "200Mi"
ports:
- containerPort: 6379
securityContext:
runAsUser: 1000
runAsGroup: 1000
---
apiVersion: v1
kind: Service
......
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
......@@ -15,7 +14,7 @@ http {
sendfile on;
keepalive_timeout 65;
server {
listen 80;
listen 8080;
server_name localhost;
location / {
root /app;
......@@ -27,4 +26,4 @@ http {
root /usr/share/nginx/html;
}
}
}
\ No newline at end of file
}
user nginx;
worker_processes 1;
events {
......@@ -27,7 +26,7 @@ http {
}
server {
listen 80;
listen 8080;
charset utf-8;
# frontend urls
......
......@@ -7,7 +7,7 @@ http {
client_max_body_size 100m;
server {
listen 80;
listen 8080;
root /usr/src/app/;
location /static/ {
......
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