generated from boboko/starter
Fix: Aligning docker compose and Dockerfile with entrypoints
This commit is contained in:
+2
-1
@@ -102,7 +102,8 @@ RUN php artisan package:discover --ansi \
|
||||
&& php artisan filament:assets --ansi
|
||||
|
||||
COPY docker/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
COPY docker/entrypoint-worker.sh /entrypoint-worker.sh
|
||||
RUN chmod +x /entrypoint.sh /entrypoint-worker.sh
|
||||
|
||||
EXPOSE 9000
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
+2
-8
@@ -19,7 +19,6 @@
|
||||
pull
|
||||
docker_build
|
||||
docker_up
|
||||
migrate
|
||||
artisan_optimize
|
||||
restart_workers
|
||||
stoic_generate_thumbs
|
||||
@@ -45,12 +44,6 @@
|
||||
{{ $compose }} up -d --remove-orphans
|
||||
@endtask
|
||||
|
||||
@task('migrate', ['on' => 'web'])
|
||||
echo ">>> Running migrations..."
|
||||
cd {{ $path }}
|
||||
{{ $compose }} exec -T app php artisan migrate --force < /dev/null
|
||||
@endtask
|
||||
|
||||
@task('artisan_optimize', ['on' => 'web'])
|
||||
echo ">>> Optimizing..."
|
||||
cd {{ $path }}
|
||||
@@ -61,9 +54,10 @@
|
||||
@endtask
|
||||
|
||||
@task('restart_workers', ['on' => 'web'])
|
||||
echo ">>> Restarting queue workers..."
|
||||
echo ">>> Restarting queue workers and scheduler..."
|
||||
cd {{ $path }}
|
||||
{{ $compose }} restart queue
|
||||
{{ $compose }} restart scheduler
|
||||
@endtask
|
||||
|
||||
@task('password_protect', ['on' => 'web'])
|
||||
|
||||
@@ -47,6 +47,7 @@ services:
|
||||
|
||||
queue:
|
||||
image: ${COMPOSE_PROJECT_NAME:-boboko-starter}-app
|
||||
entrypoint: ["/entrypoint-worker.sh"]
|
||||
command: php artisan queue:work --tries=3 --max-jobs=500 --memory=256
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
@@ -68,6 +69,7 @@ services:
|
||||
|
||||
scheduler:
|
||||
image: ${COMPOSE_PROJECT_NAME:-boboko-starter}-app
|
||||
entrypoint: ["/entrypoint-worker.sh"]
|
||||
command: php artisan schedule:work
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
|
||||
Reference in New Issue
Block a user