mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Restructure backend into microservices, add envelope encryption, DM files, and message editing
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Custom entrypoint for PostgreSQL that processes the init template
|
||||
|
||||
set -e
|
||||
|
||||
# If this is the first run (data directory is empty), process the template
|
||||
if [ ! -f /var/lib/postgresql/data/PG_VERSION ]; then
|
||||
echo "Processing PostgreSQL init template..."
|
||||
|
||||
# Substitute environment variables in the SQL template
|
||||
envsubst < /docker-entrypoint-initdb.d/init-postgres.sql.template > /docker-entrypoint-initdb.d/init-postgres.sql
|
||||
|
||||
echo "Template processing complete."
|
||||
else
|
||||
echo "PostgreSQL data directory already exists, skipping template processing."
|
||||
fi
|
||||
|
||||
# Execute the original PostgreSQL entrypoint
|
||||
exec /usr/local/bin/docker-entrypoint.sh "$@"
|
||||
Reference in New Issue
Block a user