Skip to content

Commit

Permalink
chore: strapi volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
matmut7 committed Jun 14, 2024
1 parent 9fa0812 commit 77251eb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
7 changes: 6 additions & 1 deletion .kontinuous/env/dev/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ api:
match:
kind: Deployment
value: true
volumes:
- name: public
volumeMounts:
- mountPath: /app/public
name: public

# Strapi wants to move the entire uploads dir to a backup when you import data
# so public cannot be a volume, it must be its parent
Expand All @@ -19,7 +24,7 @@ api:
.Values.global.imageRepository }}/api:{{ .Values.global.imageTag }}"
command: ["/bin/sh", "-c"]
args:
- cp -r public/* /mnt/public;
- cp -r public/. /mnt/public;
volumeMounts:
- name: public
mountPath: /mnt/public
6 changes: 6 additions & 0 deletions .kontinuous/env/preprod/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
api:
addVolumes:
- uploads
volumeMounts:
- mountPath: /app/public/uploads
name: uploads
5 changes: 0 additions & 5 deletions .kontinuous/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ api:
strategyType: Recreate # idem
securityContext:
fsGroup: 1000
volumes:
- name: public
volumeMounts:
- mountPath: /app/public
name: public

jobs:
runs:
Expand Down

0 comments on commit 77251eb

Please sign in to comment.