Whether for privacy policies or self-hosted repositories, you may wish to run Shift locally. Docker makes that possibly by creating the necessary environment for Shift to run directly on your local machine.
Not familiar with Docker? No worries. You'll be running Shift in three easy steps.
First, download the Docker Desktop for your platform.
Next, build the Shift image by running the following command:
docker build -t shift https://laravelshift.com/resources/Dockerfile
This downloads the latest
Dockerfile to create the environment for Shift. Depending on your network connection this may take a few minutes to build.
Now you can run Shift with the following command:
docker run -v /path/to/your/project:/project:delegated -e SHIFT_TOKEN=token shift
This will run the Shift Docker image you built. You will need to adjust the options.
-v option creates a file mount between the Docker image and your project files. This is a colon separated value. Replace only the first segment with the full path to your project.
-e option sets an environment variable for Shift. In this case, set the
SHIFT_TOKEN to the one you received when you purchased your Shift for Docker.
Just like the cloud-based Shifts, changes are performed in atomic commits. These commits are made to the current branch. You may checkout another branch before running this command if you would like to perform the upgrade on separate branch.
When this command finishes, your Shift is complete. There will be a
shift.md file in your project root with detailed comments for any additional upgrade steps.
If you encounter any issues, please email firstname.lastname@example.org for additional support. Be sure to include the output from running your Shift as well as any
shift.log file it generated.
Sign in with any of the following services to connect Shift with your Laravel project.
Don't use one of these services?
Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.