{"id":30331827,"url":"https://github.com/serversideup/spin-template-laravel-basic","last_synced_at":"2025-08-18T03:07:32.627Z","repository":{"id":237521710,"uuid":"794625459","full_name":"serversideup/spin-template-laravel-basic","owner":"serversideup","description":"The official Laravel Spin template when you run `spin new laravel` from CLI","archived":false,"fork":false,"pushed_at":"2025-08-12T15:11:30.000Z","size":128,"stargazers_count":18,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-12T17:11:14.629Z","etag":null,"topics":["deployment","developer-tool","docker","docker-compose","docker-swarm","laravel","spin"],"latest_commit_sha":null,"homepage":"https://serversideup.net/open-source/spin/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serversideup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"serversideup"}},"created_at":"2024-05-01T16:01:41.000Z","updated_at":"2025-08-12T15:08:38.000Z","dependencies_parsed_at":"2024-05-06T15:21:35.636Z","dependency_job_id":"b6fbff27-0eca-4f85-97cb-649a111028e3","html_url":"https://github.com/serversideup/spin-template-laravel-basic","commit_stats":null,"previous_names":["serversideup/spin-template-laravel","serversideup/spin-template-laravel-basic"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/serversideup/spin-template-laravel-basic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serversideup%2Fspin-template-laravel-basic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serversideup%2Fspin-template-laravel-basic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serversideup%2Fspin-template-laravel-basic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serversideup%2Fspin-template-laravel-basic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serversideup","download_url":"https://codeload.github.com/serversideup/spin-template-laravel-basic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serversideup%2Fspin-template-laravel-basic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270936759,"owners_count":24671003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deployment","developer-tool","docker","docker-compose","docker-swarm","laravel","spin"],"created_at":"2025-08-18T03:07:31.009Z","updated_at":"2025-08-18T03:07:32.610Z","avatar_url":"https://github.com/serversideup.png","language":"Shell","funding_links":["https://github.com/sponsors/serversideup"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\t\u003ca href=\"https://serversideup.net/open-source/spin/\"\u003e\u003cimg src=\".github/images/header.png\" width=\"1200\" alt=\"Spin Header\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# 🏆 Official \"Laravel Basic\" Template by Spin\nThis is the official Spin template for Laravel that helps you get up and running with:\n\n- Latest version of Laravel\n- SQLite\n\n## Looking for more features?\nWe have a \"[Spin Pro Laravel Template](https://getspin.pro)\" that includes more features for Laravel Pros:\n\n| Feature | Spin Basic Laravel Template | Spin Pro Laravel Template |\n|---------|---------------------------|-----------|\n| Price | Free | $199/once (lifetime access) |\n| Automated Deployments with GitHub Actions | ❌ | ✅ |\n| Local Development SSL | ❌ | ✅ (Trusted) |\n| Tunnel Support | ❌ | ✅ |\n| SMTP Trapping | ❌ | ✅ (Mailpit) |\n| Vite over HTTPS | ❌ | ✅ |\n| Databases | SQLite | ✅ MariaDB, MySQL, PostgreSQL, SQLite |\n| Redis | ❌ | ✅ |\n| Meilisearch |  ❌ | ✅ |\n| Laravel Horizon | ❌ | ✅ |\n| Laravel Reverb | ❌ | ✅ |\n| Laravel Queues | ❌ | ✅ |\n| Mailpit over HTTPS | ❌ | ✅ |\n| Node Package Manager | `yarn` | `yarn` or `npm` |\n| Support | ✅ Discord, GitHub Discussions | ✅ Private Community Support |\n\nIf you're interested in the Pro version, you visit [https://getspin.pro](https://getspin.pro) for more information.\n\n## Default configuration\nTo use this template, you must have [Spin](https://serversideup.net/open-source/spin/docs) installed.\n\n```bash\nspin new laravel my-laravel-app\n```\n\nBy default, this template is configured to work with [`spin deploy`](https://serversideup.net/open-source/spin/docs/command-reference/deploy) out of the box. If you prefer to use CI/CD to deploy your files (which is a good idea for larger teams), you'll need to make additional changes (see the \"Advanced Configuration\" section below).\n\nBefore running `spin deploy`, ensure you've complete the following:\n\n1. **ALL** steps from \"Required Changes Before Using This Template\" section have been completed\n1. You've customized and have a valid [`.spin.yml`](https://serversideup.net/open-source/spin/docs/guide/preparing-your-servers-for-spin#configure-other-server-settings) file\n1. You've customized and have a valid [`.spin-inventory.yml`](https://serversideup.net/open-source/spin/docs/guide/preparing-your-servers-for-spin#inventory)\n1. Your server is online and has been provisioned with [`spin provision`](https://serversideup.net/open-source/spin/docs/command-reference/provision)\n\n\nOnce the steps above are complete, you can run `spin deploy` to deploy your application:\n\n```bash\nspin deploy \u003cenvironment-name\u003e\n```\n\n### 🌎 Default Development URLs\n- **Laravel**: [http://localhost](http://localhost)\n- **Mailpit**: [http://localhost:8025](http://localhost:8025)\n\n## 👉 Required Changes Before Using This Template\n\u003e [!CAUTION]\n\u003e You need to make changes before using this template.\n\n### Create an `.env.production` file\nBy default, this template is configured to use `spin deploy` which defaults to the `production` environment. You need to create an `.env.production` file in the root of your project.\n\n```bash\ncp .env.example .env.production\n```\n\nConfigure your `.env.production` file with the appropriate values for your production environment. Ensure `APP_URL` is set correctly. Spin will use the domain from that variable as the production URL by default.\n\n### Set your production URL\nAlmost everyone wants to run HTTPS with a valid certificate in production for free and it's totally possible to do this with Let's Encrypt. You'll need to let Let's Encrypt which domain know what domain you are using.\n\n\u003e [!WARNING]\n\u003e **You must have your DNS configured correctly (with your provider like CloudFlare, NameCheap, etc) AND your server accessible to the outside world BEFORE running a deployment.** When Let's Encrypt validates you own the domain name, it will attempt to connect to your server over HTTP from the outside world using the [HTTP-01 challenge](https://letsencrypt.org/docs/challenge-types/). If your server is not accessible during this process, they will not issue a certificate.\n\n```yaml\n# File to update:\n# docker-compose.prod.yml\n\n      labels:\n        - \"traefik.enable=true\"\n        - \"traefik.http.routers.my-php-app.rule=Host(`${SPIN_APP_DOMAIN}`)\"\n```\n\nBy default, if you're using `spin deploy` it will use the `APP_URL` from your `.env.\u003cenvironment\u003e` file to generate the `SPIN_APP_DOMAIN`. You can also be explicit and change `${SPIN_APP_DOMAIN}` to `myapp.example.com`.\n\n### Set your email contact for Let's Encrypt certificates\nLet's encrypt requires an email address to issue certificates. You can set this in the Traefik configuration for production.\n\n```yml\n# File to update:\n# .infrastructure/conf/traefik/prod/traefik.yml\n\ncertificatesResolvers:\n  letsencryptresolver:\n    acme:\n      email: \"changeme@example.com\"\n```\n\nChange `changeme@example.com` to a valid email address. This email address will be used by Let's Encrypt to send you notifications about your certificates.\n\n### Determine if you want to use the \"AUTORUN\" feature\nBy default, we have [Laravel Automations](https://serversideup.net/open-source/docker-php/docs/laravel/laravel-automations) configured to run with the [serversideup/php](https://serversideup.net/open-source/docker-php/) Docker image.\n\nIf you do not want this behavior, you can remove the `AUTORUN_ENABLED` environment variable from the `php` service in the `docker-compose.prod.yml` file.\n\n```yml\n# File to update:\n# docker-compose.prod.yml\n\n  php:\n    image: ${SPIN_IMAGE_DOCKERFILE}\n    environment:\n      - AUTORUN_ENABLED: \"true\" # 👈 Remove this line if you don't want Laravel Automations\n```\n\n## ⚡️ Initializing in an existing project\nIf you're using an existing project with SQLite, you will need to move your database to a volume, especially if you're deploying to production with these templates.\n\n### Background\nLaravel comes with the default path of `database/database.sqlite`. This path is not ideal for Docker deployments, because the parent directory of this file contains other database files used by Laravel.\n\nFor Docker Swarm (what is used in production), we need to place the SQLite in a dedicated folder so we can mount a Docker Volume to ensure the data persists.\n\n### Laravel ENV Changes\nTo prepare the project, we automatically set the `DB_DATABASE` environment variable.\n\n```bash\n# Set absolute path to SQLite database from the container's perspective\nDB_DATABASE=/var/www/html/.infrastructure/volume_data/sqlite/database.sqlite\n```\n\n**NOTE:** Notice how this is the ABSOLUTE path to the database file. The reason why we use `/var/www/html` is because that is the absolute path to the file **in the eyes of the CONTAINER** (not the host machine).\n\n### Development Setup For SQLite\nYour project folder is mounted as `/var/www/html` inside the container. You simply need to ensure the `.infrastructure/volume_data/sqlite/database.sqlite` file exists in your project folder on your host. Move your existing database file to this location if you want to migrate your data.\n\n### Production Setup For SQLite\nWe automatically create a `database_sqlite` volume in production. This volume is mounted to `/var/www/html/.infrastructure/volume_data/sqlite/` to the `php` service.\n\n## 🚀 Running Laravel Specific Commands\nIn development, you may want to run artisan commands or composer commands. We can use [`spin run`](https://serversideup.net/open-source/spin/docs/command-reference/run) or [`spin exec`](https://serversideup.net/open-source/spin/docs/command-reference/exec) to run these commands.\n\n```bash\nspin run php php artisan migrate\n```\nThe above command will create a new container to run the `php artisan migrate` command. You can change `run` for `exec` if you'd like to run the command in an existing, **running** container.\n\n```bash\nspin run php composer install\n```\n\nThe above command will create a new container to run the `composer install` command. This is helpful if you need to install new packages or update your `composer.lock` file.\n\nIf you need to attach your terminal to the container's shell, you can use `spin exec`:\n\n```bash\nspin exec -it php sh\n```\n\nThis will attach your terminal to the `php` container's shell. If you're using an Alpine image, `sh` is the default shell. If you're using a Debian image, you can use `bash` instead of `sh`.\n\nFeel free to run any commands you'd like with `spin run` or `spin exec`. The above examples should help give you patterns what you need to do.\n\n## 👨‍🔬 Advanced configuration\nIf you'd like to further customize your experience, here are some helpful tips:\n\n### Trusted SSL certificates in development\nWe provide certificates by default. If you'd like to trust these certificates, you need to install the CA on your machine.\n\n**Download the CA Certificate:**\n- https://serversideup.net/ca/\n\nYou can create your own certificate trust if you'd like too. Just simply replace our certificates with your own.\n\n### Change the deployment image name\nIf you're using CI/CD (and NOT using `spin deploy`), you'll likely want to change the image name in the `docker-compose.prod.yml` file.\n\n```yaml\n  php:\n    image: ${SPIN_IMAGE_DOCKERFILE} # 👈 Change this if you're not using `spin deploy`\n```\n\nSet this value to the published image with your image repository.\n\n### Set the Traefik configuration MD5 hash\nWhen running `spin deploy`, we automatically grab the MD5 hash value of the Traefik configuration and set it to `SPIN_TRAEFIK_CONFIG_MD5_HASH`. This efficiently ensures your Docker Swarm Configuration is always up to date.\n\nBe sure to change this value or set the MD5 hash so you can continue to receive the benefits of getting the best deployment strategy when updating Docker Swarm configurations with Traefik.\n\n```yaml\nconfigs:\n  traefik:\n    name: \"traefik-${SPIN_TRAEFIK_CONFIG_MD5_HASH}.yml\"\n    file: ./.infrastructure/conf/traefik/prod/traefik.yml\n```\n\n## Resources\n- **[Website](https://serversideup.net/open-source/spin/)** overview of the product.\n- **[Docs](https://serversideup.net/open-source/spin/docs)** for a deep-dive on how to use the product.\n- **[Discord](https://serversideup.net/discord)** for friendly support from the community and the team.\n- **[GitHub](https://github.com/serversideup/spin)** for source code, bug reports, and project management.\n- **[Get Professional Help](https://serversideup.net/professional-support)** - Get video + screen-sharing help directly from the core contributors.\n\n## Contributing\nAs an open-source project, we strive for transparency and collaboration in our development process. We greatly appreciate any contributions members of our community can provide. Whether you're fixing bugs, proposing features, improving documentation, or spreading awareness - your involvement strengthens the project. Please review our [contribution guidelines](https://serversideup.net/open-source/spin/docs/community/contributing) and [code of conduct](./.github/code_of_conduct.md) to understand how we work together respectfully.\n\n- **Bug Report**: If you're experiencing an issue while using this project, please [create an issue](https://github.com/serversideup/spin-template-laravel/issues/new).\n- **Feature Request**: Make this project better by [submitting a feature request](https://github.com/serversideup/spin-template-laravel/issues/new).\n- **Documentation**: Improve our documentation by contributing to this README\n- **Community Support**: Help others on [GitHub Discussions](https://github.com/serversideup/spin/discussions) or [Discord](https://serversideup.net/discord).\n- **Security Report**: Report critical security issues via [our responsible disclosure policy](https://www.notion.so/Responsible-Disclosure-Policy-421a6a3be1714d388ebbadba7eebbdc8).\n\nNeed help getting started? Join our Discord community and we'll help you out!\n\n\u003ca href=\"https://serversideup.net/discord\"\u003e\u003cimg src=\"https://serversideup.net/wp-content/themes/serversideup/images/open-source/join-discord.svg\" title=\"Join Discord\"\u003e\u003c/a\u003e\n\n## Our Sponsors\nAll of our software is free an open to the world. None of this can be brought to you without the financial backing of our sponsors.\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/sponsors/serversideup\"\u003e\u003cimg src=\"https://521public.s3.amazonaws.com/serversideup/sponsors/sponsor-box.png\" alt=\"Sponsors\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n#### Individual Supporters\n\u003c!-- supporters --\u003e\u003ca href=\"https://github.com/alexjustesen\"\u003e\u003cimg src=\"https://github.com/alexjustesen.png\" width=\"40px\" alt=\"alexjustesen\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/GeekDougle\"\u003e\u003cimg src=\"https://github.com/GeekDougle.png\" width=\"40px\" alt=\"GeekDougle\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003c!-- supporters --\u003e\n\n## About Us\nWe're [Dan](https://twitter.com/danpastori) and [Jay](https://twitter.com/jaydrogers) - a two person team with a passion for open source products. We created [Server Side Up](https://serversideup.net) to help share what we learn.\n\n\u003cdiv align=\"center\"\u003e\n\n| \u003cdiv align=\"center\"\u003eDan Pastori\u003c/div\u003e                  | \u003cdiv align=\"center\"\u003eJay Rogers\u003c/div\u003e                                 |\n| ----------------------------- | ------------------------------------------ |\n| \u003cdiv align=\"center\"\u003e\u003ca href=\"https://twitter.com/danpastori\"\u003e\u003cimg src=\"https://serversideup.net/wp-content/uploads/2023/08/dan.jpg\" title=\"Dan Pastori\" width=\"150px\"\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://twitter.com/danpastori\"\u003e\u003cimg src=\"https://serversideup.net/wp-content/themes/serversideup/images/open-source/twitter.svg\" title=\"Twitter\" width=\"24px\"\u003e\u003c/a\u003e\u003ca href=\"https://github.com/danpastori\"\u003e\u003cimg src=\"https://serversideup.net/wp-content/themes/serversideup/images/open-source/github.svg\" title=\"GitHub\" width=\"24px\"\u003e\u003c/a\u003e\u003c/div\u003e                        | \u003cdiv align=\"center\"\u003e\u003ca href=\"https://twitter.com/jaydrogers\"\u003e\u003cimg src=\"https://serversideup.net/wp-content/uploads/2023/08/jay.jpg\" title=\"Jay Rogers\" width=\"150px\"\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://twitter.com/jaydrogers\"\u003e\u003cimg src=\"https://serversideup.net/wp-content/themes/serversideup/images/open-source/twitter.svg\" title=\"Twitter\" width=\"24px\"\u003e\u003c/a\u003e\u003ca href=\"https://github.com/jaydrogers\"\u003e\u003cimg src=\"https://serversideup.net/wp-content/themes/serversideup/images/open-source/github.svg\" title=\"GitHub\" width=\"24px\"\u003e\u003c/a\u003e\u003c/div\u003e                                       |\n\n\u003c/div\u003e\n\n### Find us at:\n\n* **📖 [Blog](https://serversideup.net)** - Get the latest guides and free courses on all things web/mobile development.\n* **🙋 [Community](https://community.serversideup.net)** - Get friendly help from our community members.\n* **🤵‍♂️ [Get Professional Help](https://serversideup.net/professional-support)** - Get video + screen-sharing support from the core contributors.\n* **💻 [GitHub](https://github.com/serversideup)** - Check out our other open source projects.\n* **📫 [Newsletter](https://serversideup.net/subscribe)** - Skip the algorithms and get quality content right to your inbox.\n* **🐥 [Twitter](https://twitter.com/serversideup)** - You can also follow [Dan](https://twitter.com/danpastori) and [Jay](https://twitter.com/jaydrogers).\n* **❤️ [Sponsor Us](https://github.com/sponsors/serversideup)** - Please consider sponsoring us so we can create more helpful resources.\n\n## Our products\nIf you appreciate this project, be sure to check out our other projects.\n\n### 📚 Books\n- **[The Ultimate Guide to Building APIs \u0026 SPAs](https://serversideup.net/ultimate-guide-to-building-apis-and-spas-with-laravel-and-nuxt3/)**: Build web \u0026 mobile apps from the same codebase.\n- **[Building Multi-Platform Browser Extensions](https://serversideup.net/building-multi-platform-browser-extensions/)**: Ship extensions to all browsers from the same codebase.\n\n### 🛠️ Software-as-a-Service\n- **[Bugflow](https://bugflow.io/)**: Get visual bug reports directly in GitHub, GitLab, and more.\n- **[SelfHost Pro](https://selfhostpro.com/)**: Connect Stripe or Lemonsqueezy to a private docker registry for self-hosted apps.\n\n### 🌍 Open Source\n- **[serversideup/php Docker Images](https://serversideup.net/open-source/docker-php/)**: PHP Docker images optimized for Laravel and running PHP applications in production.\n- **[Financial Freedom](https://github.com/serversideup/financial-freedom)**: Open source alternative to Mint, YNAB, \u0026 Monarch Money.\n- **[AmplitudeJS](https://521dimensions.com/open-source/amplitudejs)**: Open-source HTML5 \u0026 JavaScript Web Audio Library.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserversideup%2Fspin-template-laravel-basic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserversideup%2Fspin-template-laravel-basic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserversideup%2Fspin-template-laravel-basic/lists"}