Browse Source

Importa solo nuevos repostajes. Arreglos en montaje de directorios

main
Celestino Rey 8 months ago
parent
commit
5ae0ce8963
4 changed files with 25 additions and 13 deletions
  1. +1
    -6
      Dockerfile.k8s
  2. +1
    -1
      K8S/Makefile
  3. +3
    -0
      K8S/env-prod-configmap.yaml
  4. +20
    -6
      K8S/reymota-deployment.yaml

+ 1
- 6
Dockerfile.k8s View File

@ -33,18 +33,13 @@ RUN pip wheel --no-cache-dir --no-deps --wheel-dir /app/wheels -r requirements.t
FROM python:3.11.4-slim-buster
# create directory for the app user
RUN mkdir -p /app
# create the app user
#RUN addgroup --system app && adduser --system --group app
# create the appropriate directories
ENV APP_HOME=/app
RUN mkdir -p $APP_HOME
#RUN mkdir -p $APP_HOME/staticfiles
#RUN mkdir -p $APP_HOME/mediafiles
WORKDIR $APP_HOME
# install system dependencies


+ 1
- 1
K8S/Makefile View File

@ -1,6 +1,6 @@
export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':')
export REGISTRY=registry.reymota.es
export IMG_VERSION = 0.62
export IMG_VERSION = 0.66
export IMG_NGINX_VERSION = 1.0
# limpia todo


+ 3
- 0
K8S/env-prod-configmap.yaml View File

@ -3,6 +3,9 @@ data:
DEBUG: "False"
ENTORNO: "Producción"
SECRET_KEY: change_me
SQL_HOST: postgresql
SQL_PORT: "5432"
DATABASE: postgres
kind: ConfigMap
metadata:
labels:


+ 20
- 6
K8S/reymota-deployment.yaml View File

@ -53,21 +53,35 @@ spec:
configMapKeyRef:
key: DEBUG
name: env-prod
- name: DATABASE
valueFrom:
configMapKeyRef:
key: DATABASE
name: env-prod
- name: SQL_HOST
valueFrom:
configMapKeyRef:
key: SQL_HOST
name: env-prod
- name: SQL_PORT
valueFrom:
configMapKeyRef:
key: SQL_PORT
name: env-prod
ports:
- containerPort: 8000
protocol: TCP
volumeMounts:
- mountPath: /app/reymota/mediafiles
- mountPath: /app/src/mediafiles
name: reymota-media
- mountPath: /app/reymota/lyrics/migrations
- mountPath: /app/src/lyrics/migrations
name: reymota-lyrics-migrations
- mountPath: /app/reymota/repostajes/migrations
- mountPath: /app/src/repostajes/migrations
name: reymota-repostajes-migrations
- mountPath: /app/reymota/reymotausers/migrations
- mountPath: /app/src/reymotausers/migrations
name: reymota-reymotausers-migrations
- mountPath: /app/reymota/staticfiles
- mountPath: /app/src/staticfiles
name: static-volume
imagePullSecrets:
- name: myregistrykey


Loading…
Cancel
Save