diff options
Diffstat (limited to 'bundles/timelinize/files')
| -rw-r--r-- | bundles/timelinize/files/kube.yaml | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/bundles/timelinize/files/kube.yaml b/bundles/timelinize/files/kube.yaml new file mode 100644 index 0000000..cb47ee2 --- /dev/null +++ b/bundles/timelinize/files/kube.yaml @@ -0,0 +1,116 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: dawarich +data: + RAILS_ENV: production + REDIS_URL: redis://redis:6379 + DATABASE_HOST: postgis + DATABASE_PORT: 5432 + MIN_MINUTES_SPENT_IN_CITY: 60 + APPLICATION_HOSTS: dawarich.iz.ts.gzr.im,dawarich.gzr.im + TIME_ZONE: Europe/Berlin + APPLICATION_PROTOCOL: http + PROMETHEUS_EXPORTER_ENABLED: false + PROMETHEUS_EXPORTER_HOST: 0.0.0.0 + PROMETHEUS_EXPORTER_PORT: 9394 + SECRET_KEY_BASE: 1234567890 + RAILS_LOG_TO_STDOUT: "true" + SELF_HOSTED: "true" + STORE_GEODATA: "true" + BACKGROUND_PROCESSING_CONCURRENCY: 10 +--- +apiVersion: v1 +kind: Pod +metadata: + name: dawarich + labels: + traefik.enable: true + traefik.http.routers.dawarich.tls: false + traefik.http.routers.dawarich.tls.certresolver: le + traefik.http.routers.dawarich.entrypoints: http,https + traefik.http.routers.dawarich.rule: Host(`dawarich.iz.ts.gzr.im`) + traefik.http.routers.dawarich.service: dawarich + traefik.http.services.dawarich.loadbalancer.server.port: 3000 +spec: + restartPolicy: Always + dnsPolicy: Default + containers: + - name: dawarich + image: docker.io/freikin/dawarich:0.30.11 + command: ['web-entrypoint.sh', 'rails', 'server', '-p', '3000', '-b', '::'] + envFrom: + - configMapRef: + name: dawarich + - secretRef: + name: dawarich + ports: + - containerPort: 3000 + protocol: TCP + # - containerPort: 9394 # prom + # protocol: TCP + volumeMounts: + - name: public + mountPath: /var/app/public + - name: import + mountPath: /var/app/tmp/imports/watched + - name: data + mountPath: /var/app/storage + livenessProbe: + exec: + command: ["sh", "-c", "wget -qO - http://127.0.0.1:3000/api/v1/health | grep -q '\"status\"\\s*:\\s*\"ok\"'"] + # resources: + # limits: + # cpu: 300m + # memory: 512Mi + + - name: sidekiq + image: docker.io/freikin/dawarich:0.30.11 + command: ['sidekiq-entrypoint.sh', 'sidekiq'] + envFrom: + - configMapRef: + name: dawarich + - secretRef: + name: dawarich + livenessProbe: + exec: + command: ["sh", "-c", "pgrep -f sidekiq"] + + - name: redis + image: docker.io/redis:7.4-alpine + livenessProbe: + exec: + command: ["sh", "-c", "redis-cli ping || exit 1"] + + - name: postgis + image: postgis/postgis:17-3.5-alpine + envFrom: + - secretRef: + name: dawarich + volumeMounts: + - name: pg-data + mountPath: /var/lib/postgresql/data + livenessProbe: + exec: + command: + - /bin/sh + - -c + - pg_isready -d '${POSTGRES_DB}' -U '${POSTGRES_USER}' || exit 1 + + volumes: + - name: public + hostPath: + path: /var/lib/dawarich/public + type: DirectoryOrCreate + - name: import + hostPath: + path: /var/lib/dawarich/import + type: DirectoryOrCreate + - name: data + hostPath: + path: /var/lib/dawarich/data + type: DirectoryOrCreate + - name: pg-data + hostPath: + path: /var/lib/dawarich/db + type: DirectoryOrCreate |