Skip to content

Commit

Permalink
fix entrypoint.sh in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarzin committed Jan 22, 2024
1 parent 893407e commit 7267bd9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion docker/docker-compose.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
# SMTP conf
- ./ssmtp.conf:/etc/ssmtp/ssmtp.conf
# Mercator entry point
# - ./entrypoint.sh:/var/www/mercator/docker/entrypoint.sh:ro
- ./entrypoint.sh:/var/www/mercator/docker/entrypoint.sh:ro
# ne peut pas être read-only (commande php artisan key:generate le modifie)
- ./.env:/var/www/mercator/.env
# map la database sqlite sur le disque de l'hôte
Expand Down
16 changes: 0 additions & 16 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,10 @@ _wait_for_db_ready() {
echo "done."
}


cd /var/www/mercator
. .env

_wait_for_db_ready

# initialisation de la base de données si elle n'existe pas
if [ ! -s ./sql/db.sqlite ]
then
php artisan --no-interaction migrate --seed

# génération des clés
php artisan key:generate

# vider le cache
php artisan config:clear

# configurer Passport for Mercator API : https://dbarzin.github.io/mercator/api/
php artisan passport:install
fi

# start application
php artisan serve --host=0.0.0.0

0 comments on commit 7267bd9

Please sign in to comment.