summaryrefslogtreecommitdiff
path: root/roles/apps/pigallery2/templates/pod-spec.yml.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-07-13 22:07:12 +0200
committerChristian Pointner <equinox@spreadspace.org>2022-07-13 22:07:12 +0200
commit6a485dcc7065f048172e89e405068e6a5c1479b7 (patch)
tree07794f9751fd3689ceef344662adf41b6cf6e397 /roles/apps/pigallery2/templates/pod-spec.yml.j2
parentupdate traffic shaping for ele-router-leslie (diff)
add apps/pigallery2
Diffstat (limited to 'roles/apps/pigallery2/templates/pod-spec.yml.j2')
-rw-r--r--roles/apps/pigallery2/templates/pod-spec.yml.j247
1 files changed, 47 insertions, 0 deletions
diff --git a/roles/apps/pigallery2/templates/pod-spec.yml.j2 b/roles/apps/pigallery2/templates/pod-spec.yml.j2
new file mode 100644
index 00000000..e0921b3b
--- /dev/null
+++ b/roles/apps/pigallery2/templates/pod-spec.yml.j2
@@ -0,0 +1,47 @@
+securityContext:
+ allowPrivilegeEscalation: false
+containers:
+- name: pigallery2
+ image: "bpatrik/pigallery2:{{ item.value.version }}"
+ securityContext:
+ runAsUser: {{ pigallery2_app_uid }}
+ runAsGroup: {{ pigallery2_app_gid }}
+ resources:
+ limits:
+ memory: "1Gi"
+ volumeMounts:
+ - name: config
+ mountPath: /app/data/config
+ - name: db
+ mountPath: /app/data/db
+ - name: tmp
+ mountPath: /app/data/tmp
+ - name: images
+ mountPath: /app/data/images
+ readOnly: true
+ env:
+ - name: PORT
+ value: "{{ item.value.port }}"
+ - name: NODE_ENV
+ value: production
+ ports:
+ - containerPort: {{ item.value.port }}
+ hostPort: {{ item.value.port }}
+ hostIP: 127.0.0.1
+volumes:
+- name: config
+ hostPath:
+ path: "{{ pigallery2_base_path }}/{{ item.key }}/config/"
+ type: Directory
+- name: db
+ hostPath:
+ path: "{{ pigallery2_base_path }}/{{ item.key }}/db/"
+ type: Directory
+- name: tmp
+ hostPath:
+ path: "{{ pigallery2_base_path }}/{{ item.key }}/tmp/"
+ type: Directory
+- name: images
+ hostPath:
+ path: "{{ item.value.images_path }}"
+ type: Directory