hydra-sql/misc/compose/hydra-sql/docker-entrypoint.sh

19 lines
501 B
Bash

#!/bin/bash
set -eo pipefail
if [ ! -e /container-lifecycle/first_run ]; then
echo "First hydra-sql run detected. Initializing environment..."
sudo -E /root/first-run.sh
sudo touch /container-lifecycle/first_run
fi
# Récupération des clés SSH de l'hôte pour Composer
if [ -d '/root/.host-ssh' ] && [ $(id -u) -eq 0 ]; then
sudo rm -rf /root/.ssh
sudo cp -r /root/.host-ssh /root/.ssh
sudo chown -R root: /root/.ssh
fi
sudo -E /usr/bin/supervisord -c /etc/supervisor/supervisor.ini