Where to put the php artisan migrate command

后端 未结 3 403
被撕碎了的回忆
被撕碎了的回忆 2020-12-09 10:07

Trying to deploy the laravel application on docker stack .What I am confused or not able to figure out is where can I run this php artisan migrate:fresh t

3条回答
  •  我在风中等你
    2020-12-09 10:11

    To run all migrate you need to be inside your container, for that you need to run your containers with docker-compose up, here u need to be with terminal in the directory where your docker-compose.yml file is.

    after that, and with the same place of docker-compose.yml file, run this command to be inside your container:

    docker exec -it name_of_container bash
    

    and when you will be inside your container, go to your shared app inside the container, I think here is the app so cd app.

    after all of this run:

    php artisan migrate
    

提交回复
热议问题