Skip to content

Commit

Permalink
Merge pull request #612 from dbarzin/dev
Browse files Browse the repository at this point in the history
work on docker
  • Loading branch information
dbarzin authored Jan 26, 2024
2 parents 33f9359 + 2f20392 commit 77e045e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ RUN chown -R mercator:www /var/www/mercator
# Now work with Mercator user
USER mercator:www

# Set environment variables
cp .env.sqlite .env

# Run composer
RUN composer -n update

# Publish Laravel Vendor resources
# RUN php artisan vendor:publish --all
RUN php artisan vendor:publish --all

# Create database folder
RUN mkdir sql

EXPOSE 8000
# copy environement varaibles file
cp .env.sqlite .env

# Start surpervisord
EXPOSE 8000
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
5 changes: 2 additions & 3 deletions docker/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ nodaemon=true

[program:migrate]
command=/bin/sh -c '
cd /var/www/mercator;
if [ ! -s ${DB_DATABASE} ];
then
php artisan migrate --seed --force --path=database/migrations;
php artisan migrate --seed --force;
else
php artisan migrate --force --path=database/migrations;
php artisan migrate --force;
fi;
touch /tmp/migrated'
autorestart=false
Expand Down

0 comments on commit 77e045e

Please sign in to comment.