fix(linkace): Remove init containers, upstream made some changes to simplify (#2462)
This commit is contained in:
@@ -27,7 +27,7 @@ sources:
|
||||
- https://www.linkace.org/docs/
|
||||
- https://github.com/linkace/linkace
|
||||
- https://hub.docker.com/r/linkace/linkace
|
||||
version: 2.0.15
|
||||
version: 2.0.16
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- media
|
||||
|
||||
@@ -53,56 +53,6 @@ envValueFrom:
|
||||
name: linkace-secrets
|
||||
key: APP_KEY
|
||||
|
||||
initContainers:
|
||||
# Copy app to a temp folder as we gonna need it, so we can create the ".env" file in there.
|
||||
1-copy-app:
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
volumeMounts:
|
||||
- name: app
|
||||
mountPath: "/tmp"
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- >
|
||||
echo "Copying app...";
|
||||
cp -R /app/* /tmp/;
|
||||
# App checks ".env" for "SETUP_COMPELTED" status, to determine if it needs to run initial setup or not.
|
||||
# We create this file and set it to false if it doesn't exists.
|
||||
# If it exists, we let the app decide it's value (true|false) and how to proceed.
|
||||
2-create-env-file:
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
volumeMounts:
|
||||
- name: app
|
||||
mountPath: "/app"
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- >
|
||||
if [ ! -f "/app/.env" ];
|
||||
then
|
||||
echo "Preparing for initial installation";
|
||||
echo "SETUP_COMPLETED=false" > /app/.env;
|
||||
echo "File .env created.";
|
||||
else
|
||||
echo "Initial installation has already completed.";
|
||||
fi;
|
||||
# App does not like 775 perms on dirs.. So we have to set 777
|
||||
3-chmod:
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
volumeMounts:
|
||||
- name: app
|
||||
mountPath: "/app"
|
||||
- name: logs
|
||||
mountPath: "/app/storage/logs"
|
||||
- name: backups
|
||||
mountPath: "/app/storage/app/backups"
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- >
|
||||
echo "CHMOD-ing files...";
|
||||
chmod -R 777 /app;
|
||||
chmod -R 777 /app/storage/logs;
|
||||
chmod -R 777 /app/storage/app/backups;
|
||||
echo "CHMOD Complete";
|
||||
|
||||
# Set cron every 15 min, official docs says every minute, but seems excesive.
|
||||
# It just checks for dead links and sends a request to WayBack Machine to archive.
|
||||
cronjob:
|
||||
|
||||
Reference in New Issue
Block a user