Skip to content

Commit

Permalink
docker: Copy config, instead of symlink. This means config is a stand…
Browse files Browse the repository at this point in the history
…ard file, and changes wont affect running containers.
  • Loading branch information
jamesread committed Sep 14, 2024
1 parent e88629a commit 2ffa3dd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions var/docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#!/bin/bash

set -o xtrace

if [[ "$SKIP_CONFIG_CHECK" != "true" ]]; then
echo "symlinking /config/.env into /app/.env"
echo "Entrypoint: Copying /config/postiz.env into /app/.env"

if [ ! -f /config/.env ]; then
echo "ERROR: No .env file found in /config/.env"
echo "Entrypoint: WARNING: No .env file found in /config/postiz.env"
fi

ln -sf /config/postiz.env /app/.env
cp -vf /config/postiz.env /app/.env
fi

if [[ "$POSTIZ_APPS" -eq "" ]]; then
echo "POSTIZ_APPS is not set, starting everything!"
echo "Entrypoint: POSTIZ_APPS is not set, starting everything!"
POSTIZ_APPS="frontend workers cron backend"
fi

echo "Running database migrations"
echo "Entrypoint: Running database migrations"
npm run prisma-db-push

mkdir -p /etc/supervisor.d/
Expand Down

0 comments on commit 2ffa3dd

Please sign in to comment.