Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work on docker #612

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading