Skip to content

Commit

Permalink
Merge pull request #595 from dbarzin/dev
Browse files Browse the repository at this point in the history
fix entrypoint
  • Loading branch information
dbarzin authored Jan 22, 2024
2 parents 9885046 + 938c532 commit a227b5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 38 deletions.
34 changes: 1 addition & 33 deletions docker/docker-compose.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,15 @@ services:
volumes:
# SMTP conf
- ./ssmtp.conf:/etc/ssmtp/ssmtp.conf
# Mercator entry point
- ./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
- ./data/sql/:/var/www/mercator/sql/
# entrypoint: /bin/sleep 3600 # pour debug
# - ./:/var/www
#nginx conf listen port 80 or other if custom
# nginx conf listen port 80 or other if custom
ports:
- 8000:80
networks:
- local
# Non fonctionnel pour le moment la database utilisé par défaut est interne au conteneur APP
#db:
# image: mysql:5.7
# restart: unless-stopped
# environment:
# MYSQL_DATABASE: ${DB_DATABASE}
# MYSQL_USER: ${DB_USERNAME}
# MYSQL_PASSWORD: ${DB_PASSWORD}
# MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
# # MYSQL_ALLOW_EMPTY_PASSWORD: "true"
# volumes:
# - db:/var/lib/mysql
# - ./data/backup:/backup
# - ./bin/mysql:/app/
# networks:
# - local

# nginx:
# image: nginx:alpine
# container_name: travellist-nginx
# restart: unless-stopped
# ports:
# - 8000:80
# volumes:
# - ./:/var/www
# - ./docker-compose/nginx:/etc/nginx/conf.d/
# networks:
# - local

networks:
local:
Expand Down
10 changes: 5 additions & 5 deletions docker/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ nodaemon=true

[program:migrate]
command=/bin/sh -c '
if [ ! -s ${DB_DATABASE} ];
if [ ! -f ${DB_DATABASE} ]
then
touch ${DB_DATABASE} && chmod a+x ${DB_DATABASE} &&
php artisan migrate --force &&
php artisan db:seed --force &&
php artisan passport:install
fi;'
(php artisan migrate --force || true) &&
(php artisan db:seed --force && php artisan passport:install || true)
fi;
touch /tmp/migrated'
autorestart=false
startretries=0
redirect_stderr=true
Expand Down

0 comments on commit a227b5c

Please sign in to comment.