How to restart dev spin up after adding commands? #148
-
I am very new to docker and spin. In my services:
php:
build:
target: development
args:
USER_ID: ${SPIN_USER_ID}
GROUP_ID: ${SPIN_GROUP_ID}
volumes:
- .:/var/www/html/
networks:
- development
depends_on:
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.laravel.rule=HostRegexp(`localhost`)"
- "traefik.http.routers.laravel.entrypoints=web"
- "traefik.http.services.laravel.loadbalancer.server.port=8080"
- "traefik.http.services.laravel.loadbalancer.server.scheme=http"
command: |
/bin/sh -c "
php artisan storage:link &&
php artisan queue:work --tries=3"
How can I stop and restart spin so that the commands of storage:link and queue:work are run in the container? |
Beta Was this translation helpful? Give feedback.
Answered by
jaydrogers
Jan 7, 2025
Replies: 1 comment
-
When you run a command like that, it will execute those commands and then exit. I would advise checking out Spin Pro (https://getspin.pro/) for a turn key solution or following the serversideup/php docs on how to run a queue: https://serversideup.net/open-source/docker-php/docs/laravel/laravel-queue |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
akulmehta
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When you run a command like that, it will execute those commands and then exit.
I would advise checking out Spin Pro (https://getspin.pro/) for a turn key solution or following the serversideup/php docs on how to run a queue: https://serversideup.net/open-source/docker-php/docs/laravel/laravel-queue