Browse Source

Cambios para que funcione en todos los clusters

main
Celestino Rey 2 months ago
parent
commit
546667dc73
4 changed files with 9 additions and 50 deletions
  1. +9
    -12
      K8S/reymota-deployment.yaml
  2. +0
    -4
      nginx/Dockerfile
  3. +0
    -8
      nginx/Makefile
  4. +0
    -26
      nginx/nginx.conf

+ 9
- 12
K8S/reymota-deployment.yaml View File

@ -4,9 +4,11 @@ metadata:
name: reymota
namespace: reymota
spec:
type: NodePort
ports:
- name: "8000"
port: 8000
nodePort: 30347
targetPort: 8000
selector:
app: reymota
@ -31,13 +33,8 @@ spec:
app: reymota
spec:
containers:
- args:
- gunicorn
- reymota.wsgi:application
- --bind
- 0.0.0.0:8000
name: reymota
image: $REGISTRY/reymota-$ARQUITECTURA:$IMG_VERSION
- name: reymota
image: registry.reymota.es/reymota:<TAG>
env:
- name: IMG_VERSION
value: "$IMG_VERSION"
@ -77,16 +74,16 @@ spec:
- containerPort: 8000
protocol: TCP
volumeMounts:
- mountPath: /app/src/mediafiles
- mountPath: /app/mediafiles
name: reymota-media
- mountPath: /app/src/lyrics/migrations
- mountPath: /app/lyrics/migrations
name: reymota-lyrics-migrations
- mountPath: /app/src/repostajes/migrations
- mountPath: /app/repostajes/migrations
name: reymota-repostajes-migrations
- mountPath: /app/src/reymotausers/migrations
- mountPath: /app/reymotausers/migrations
name: reymota-reymotausers-migrations
- mountPath: /app/src/staticfiles
- mountPath: /app/staticfiles
name: static-volume
imagePullSecrets:
- name: myregistrykey


+ 0
- 4
nginx/Dockerfile View File

@ -1,4 +0,0 @@
FROM nginx:1.25
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d

+ 0
- 8
nginx/Makefile View File

@ -1,8 +0,0 @@
install:
echo "Creando imagen con version '${IMG_NGINX_VERSION}' para la arquitectura '${ARQUITECTURA}' en el registry '${REGISTRY}'"
docker build --no-cache -t ${REGISTRY}/nginx-reymota-${ARQUITECTURA}:${IMG_NGINX_VERSION} .
docker push ${REGISTRY}/nginx-reymota-${ARQUITECTURA}:${IMG_NGINX_VERSION}

+ 0
- 26
nginx/nginx.conf View File

@ -1,26 +0,0 @@
upstream reymota {
server reymota:8000;
}
server {
listen 80;
location / {
proxy_pass http://reymota;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
client_max_body_size 100M;
}
location /static/ {
alias /app/reymota/staticfiles/;
}
location /media/ {
alias /app/reymota/mediafiles/;
}
}

Loading…
Cancel
Save