├── .cursorrules ├── .github ├── ISSUE_TEMPLATE │ ├── bug.yml │ └── config.yml ├── code_of_conduct.md ├── small-header.png ├── spin-diagram.png └── workflows │ ├── publish-prerelease.yml │ ├── publish-stable-release.yml │ ├── service_publish-node-package.yml │ └── sponsors.yml ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── SECURITY.md ├── bin └── spin ├── cache └── .gitignore ├── composer.json ├── conf ├── .gitignore └── spin.example.conf ├── docs ├── .env.example ├── .gitignore ├── .npmrc ├── .nvmrc ├── README.md ├── assets │ └── css │ │ ├── animations.css │ │ ├── docsearch.css │ │ ├── hamburger.css │ │ └── tailwind.css ├── components │ ├── Docs │ │ ├── Anchor.vue │ │ ├── Eyebrow.vue │ │ ├── Footer.vue │ │ ├── Header.vue │ │ ├── Logo.vue │ │ ├── ModeToggle.vue │ │ ├── Navigation.vue │ │ ├── NavigationGroup.vue │ │ ├── PageLink.vue │ │ ├── Search.vue │ │ ├── SmallPrint.vue │ │ ├── Tag.vue │ │ └── TopLevelNavItem.vue │ ├── DocumentDrivenNotFound.vue │ ├── Global │ │ ├── MobileMenu.vue │ │ ├── OgImage │ │ │ └── DocsImage.vue │ │ └── ServerSideUp.vue │ ├── Icons │ │ ├── Anchor.vue │ │ ├── Arrow.vue │ │ ├── ChatBubbleIcon.vue │ │ ├── Check.vue │ │ ├── CheckIcon.vue │ │ ├── ClipboardIcon.vue │ │ ├── EnvelopeIcon.vue │ │ ├── Moon.vue │ │ ├── Resource.vue │ │ ├── Search.vue │ │ ├── Social │ │ │ ├── Discord.vue │ │ │ ├── GitHub.vue │ │ │ └── Twitter.vue │ │ ├── Sun.vue │ │ ├── UserIcon.vue │ │ └── UsersIcon.vue │ └── content │ │ ├── AppButton.vue │ │ ├── AppHeading2.vue │ │ ├── AppHeading3.vue │ │ ├── AppHeading4.vue │ │ ├── AppLink.vue │ │ ├── Code │ │ ├── ClipboardIcon.vue │ │ ├── CopyButton.vue │ │ └── PanelHeader.vue │ │ ├── CodeGroup.vue │ │ ├── CodePanel.vue │ │ ├── Column.vue │ │ ├── DiscordIcon.vue │ │ ├── DocsIcon.vue │ │ ├── FeatureGrid.vue │ │ ├── GitHubIcon.vue │ │ ├── GridPattern.vue │ │ ├── Guide.vue │ │ ├── Guides.vue │ │ ├── HeartIcon.vue │ │ ├── HeroPattern.vue │ │ ├── HubMain.vue │ │ ├── InfoIcon.vue │ │ ├── LeadP.vue │ │ ├── MarketingFollowAlong.vue │ │ ├── MarketingGetStarted.vue │ │ ├── MarketingGrid.vue │ │ ├── MarketingHeader.vue │ │ ├── MarketingHero.vue │ │ ├── MarketingServers.vue │ │ ├── MarketingShipFaster.vue │ │ ├── MarketingVideo.vue │ │ ├── NotProse.vue │ │ ├── Note.vue │ │ ├── Properties.vue │ │ ├── Property.vue │ │ ├── Resources.vue │ │ ├── Resources │ │ ├── Pattern.vue │ │ ├── Resource.vue │ │ └── ResourceIcon.vue │ │ ├── ResponsiveImage.vue │ │ ├── Row.vue │ │ ├── Search.vue │ │ └── VideoEmbed.vue ├── composables │ └── states.ts ├── content │ ├── docs │ │ ├── 1.index.md │ │ ├── 1.installation │ │ │ ├── 1.install-macos.md │ │ │ ├── 2.install-windows.md │ │ │ ├── 3.install-linux.md │ │ │ ├── 4.install-composer.md │ │ │ └── 5.install-npm-yarn.md │ │ ├── 11.community │ │ │ ├── 1.get-help.md │ │ │ ├── 2.testing.md │ │ │ └── 3.contributing.md │ │ ├── 2.getting-started │ │ │ ├── 1.how-spin-works.md │ │ │ ├── 2.create-a-new-project-with-spin.md │ │ │ └── 3.add-spin-to-an-existing-project.md │ │ ├── 3.development-environment │ │ │ ├── 1.starting-up-your-development-environment.md │ │ │ └── 2.running-commands-in-development.md │ │ ├── 4.server-configuration │ │ │ ├── 1.server-requirements.md │ │ │ ├── 2.server-configuration-basics.md │ │ │ └── 3.spin-yml-usage.md │ │ ├── 5.providers │ │ │ ├── 0.digitalocean.md │ │ │ ├── 0.hetzner.md │ │ │ ├── 0.vultr.md │ │ │ └── 99.use-any-host.md │ │ ├── 6.deployment │ │ │ ├── 1.choosing-a-deployment-strategy.md │ │ │ ├── 2.automated-deployments-with-github-actions.md │ │ │ └── 3.using-spin-deploy.md │ │ ├── 7.server-access │ │ │ ├── 1.connecting-to-your-server.md │ │ │ ├── 2.troubleshooting-your-application.md │ │ │ └── 3.updating-your-server.md │ │ ├── 8.advanced │ │ │ ├── 2.generating-a-secure-ssh-key.md │ │ │ ├── 3.adding-other-services.md │ │ │ ├── 99.create-your-own-template.md │ │ │ └── migrating-from-spin-v2-to-v3.md │ │ └── 9.command-reference │ │ │ ├── base64.md │ │ │ ├── build.md │ │ │ ├── configure.md │ │ │ ├── debug.md │ │ │ ├── deploy.md │ │ │ ├── down.md │ │ │ ├── exec.md │ │ │ ├── gh.md │ │ │ ├── help.md │ │ │ ├── init.md │ │ │ ├── kill.md │ │ │ ├── latest.md │ │ │ ├── logs.md │ │ │ ├── maintain.md │ │ │ ├── mkpasswd.md │ │ │ ├── new.md │ │ │ ├── provision.md │ │ │ ├── prune.md │ │ │ ├── ps.md │ │ │ ├── pull.md │ │ │ ├── run.md │ │ │ ├── stop.md │ │ │ ├── up.md │ │ │ ├── update.md │ │ │ ├── vault.md │ │ │ └── version.md │ ├── hub.md │ ├── hub │ │ ├── 0.laravel-basic.md │ │ ├── 0.laravel-pro.md │ │ └── 0.nuxt.md │ └── index.md ├── layouts │ ├── docs.vue │ ├── hub.vue │ ├── hubdetail.vue │ └── marketing.vue ├── middleware │ └── directory.ts ├── nuxt.config.ts ├── package.json ├── public │ └── images │ │ ├── docs │ │ ├── community-templates │ │ │ ├── serversideup.png │ │ │ ├── spin-laravel-basic.png │ │ │ ├── spin-laravel-pro.png │ │ │ ├── spin-new-community-template.png │ │ │ └── spin-nuxt.png │ │ ├── digitalocean │ │ │ ├── api-sidebar.png │ │ │ ├── generate-token.png │ │ │ └── token-scopes.png │ │ ├── getting-started │ │ │ └── server-dns.png │ │ ├── github-actions │ │ │ ├── gha-secrets.png │ │ │ ├── github-secrets.png │ │ │ ├── secrets.png │ │ │ └── zero-downtime-deployment.png │ │ ├── hetzner │ │ │ ├── api-token-page.png │ │ │ ├── generate-token.png │ │ │ └── select-project.png │ │ ├── vultr │ │ │ ├── api-link.png │ │ │ ├── api-token.png │ │ │ └── enable-api.png │ │ ├── whats-spin │ │ │ ├── docker-compose-overrides.png │ │ │ ├── docker-overrides-code.png │ │ │ ├── spin-deploy.png │ │ │ ├── spin-diagram.png │ │ │ ├── spin-maintain.png │ │ │ └── spin-provision.png │ │ └── windows │ │ │ ├── docker-accept-eula.png │ │ │ ├── docker-desktop-configuration.png │ │ │ ├── docker-info.png │ │ │ ├── docker-installation-options.png │ │ │ ├── docker-login.png │ │ │ ├── docker-reboot.png │ │ │ ├── docker-run-hello-world.png │ │ │ ├── shell-linux.png │ │ │ ├── shell-windows.png │ │ │ ├── ubuntu-shell.png │ │ │ ├── wsl-configure.png │ │ │ └── wsl-install.png │ │ ├── favicon │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── apple-touch-icon.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── mstile-150x150.png │ │ ├── safari-pinned-tab.svg │ │ └── site.webmanifest │ │ ├── github-actions.png │ │ ├── icons │ │ ├── heart.svg │ │ └── search-icon.svg │ │ ├── logos │ │ ├── amplitude.svg │ │ ├── server-side-up-footer.svg │ │ ├── server-side-up-logo-horizontal.svg │ │ └── spin-logo.svg │ │ └── social-image.jpg ├── server │ ├── api │ │ └── search.json.get.ts │ └── routes │ │ └── sitemap.xml.ts ├── tailwind.config.js ├── tsconfig.json ├── typography.js └── yarn.lock ├── lib ├── actions │ ├── base64.sh │ ├── build.sh │ ├── configure.sh │ ├── debug.sh │ ├── deploy.sh │ ├── down.sh │ ├── exec.sh │ ├── gh.sh │ ├── help.sh │ ├── init.sh │ ├── kill.sh │ ├── latest.sh │ ├── logs.sh │ ├── maintain.sh │ ├── mkpasswd.sh │ ├── new.sh │ ├── provision.sh │ ├── prune.sh │ ├── ps.sh │ ├── pull.sh │ ├── run.sh │ ├── stop.sh │ ├── up.sh │ ├── update.sh │ ├── vault.sh │ └── version.sh └── functions.sh ├── package.json └── tools ├── install.sh └── upgrade.sh /.cursorrules: -------------------------------------------------------------------------------- 1 | You are an expert in Bash scripting, Docker, and Ansible. You possess deep knowledge of best practices and performance optimizations techniques for writing Bash and Ansible code. 2 | 3 | The project you're working on is called Spin, which is a tool that helps people create new projects, create infrastructure, and maintain existing infrastructure using Docker Compose, Docker Swarm, Ansible, and more. 4 | 5 | Code Style and Structure 6 | - Write clean, maintainable and technically accurate code. 7 | - All bash must be POSIX compliant. 8 | - All bash must be compatible with Linux, WSL2, and MacOS (Bash v3) 9 | - Never use an approach you're not confident about. If you're unsure about something, ask for clarity. 10 | - Always follow best practices for Bash, Ansible, and Docker. 11 | - This project should work on Linux, WSL2, and MacOS without installing any additional dependencies other than Docker. 12 | 13 | This project is open source and the code is available on GitHub, so be sure to follow best practices to make it easy for others to understand, modify, and contribute to the project. 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.yml: -------------------------------------------------------------------------------- 1 | name: "\U0001F41B Bug Report" 2 | description: "You found a bug in the code \U0001F914" 3 | labels: ["Bug: Needs Confirmation 🧐"] 4 | body: 5 | - type: textarea 6 | attributes: 7 | label: Current Behavior 8 | description: A concise description of what you're experiencing. 9 | validations: 10 | required: true 11 | - type: textarea 12 | attributes: 13 | label: Expected Behavior 14 | description: A concise description of what you expected to happen. 15 | validations: 16 | required: true 17 | - type: textarea 18 | attributes: 19 | label: Steps To Reproduce 20 | description: Steps to reproduce the behavior. 21 | placeholder: | 22 | 1. In this environment... 23 | 2. With this config... 24 | 3. Run '...' 25 | 4. See error... 26 | validations: 27 | required: true 28 | - type: textarea 29 | attributes: 30 | label: Environment 31 | description: | 32 | Run `spin debug` and paste your output below. 33 | render: markdown 34 | validations: 35 | required: true 36 | - type: textarea 37 | attributes: 38 | label: Anything else? 39 | description: | 40 | Links? References? Anything that will give us more context about the issue you are encountering! 41 | 42 | Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. 43 | validations: 44 | required: false -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: ❓ Support Question 4 | url: https://github.com/serversideup/spin/discussions/11 5 | about: Get friendly support from the community on our forum. 6 | 7 | - name: ✨ Request a feature 8 | url: https://github.com/serversideup/spin/discussions/9 9 | about: Learn how to request a new feature. 10 | 11 | - name: 🤵 Get Professional Support & Customizations 12 | url: https://serversideup.net/get-help/?quick_question=spin 13 | about: Skip the line and get priority support directly from the creators of Spin. -------------------------------------------------------------------------------- /.github/small-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/.github/small-header.png -------------------------------------------------------------------------------- /.github/spin-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/.github/spin-diagram.png -------------------------------------------------------------------------------- /.github/workflows/publish-prerelease.yml: -------------------------------------------------------------------------------- 1 | name: publish-beta 2 | 3 | on: 4 | workflow_dispatch: 5 | release: 6 | types: [prereleased] 7 | 8 | jobs: 9 | publish-prerelease: 10 | uses: ./.github/workflows/service_publish-node-package.yml 11 | with: 12 | release-tag: beta 13 | secrets: inherit -------------------------------------------------------------------------------- /.github/workflows/publish-stable-release.yml: -------------------------------------------------------------------------------- 1 | name: publish-stable 2 | 3 | on: 4 | workflow_dispatch: 5 | release: 6 | types: [released] 7 | 8 | jobs: 9 | publish-stable-release: 10 | uses: ./.github/workflows/service_publish-node-package.yml 11 | with: 12 | release-tag: latest 13 | secrets: inherit -------------------------------------------------------------------------------- /.github/workflows/service_publish-node-package.yml: -------------------------------------------------------------------------------- 1 | on: 2 | workflow_call: 3 | inputs: 4 | runs-on: 5 | required: false 6 | type: string 7 | default: 'ubuntu-22.04' 8 | node-version: 9 | required: false 10 | type: string 11 | default: '18' 12 | release-tag: 13 | required: true 14 | type: string 15 | 16 | jobs: 17 | publish: 18 | runs-on: ${{ inputs.runs-on }} 19 | 20 | steps: 21 | - name: Setup Node.js 22 | uses: actions/setup-node@v3 23 | with: 24 | node-version: ${{ inputs.node-version }} 25 | registry-url: https://registry.npmjs.org/ 26 | 27 | - name: checkout 28 | uses: actions/checkout@v4 29 | 30 | - name: Set NPM version (${{ github.ref_name }}). 31 | run: npm version --git-tag-version=false --commit-hooks=false ${{ github.ref_name }} 32 | 33 | - name: Publish release (${{ inputs.release-tag }}) 34 | run: npm publish --access public --tag ${{ inputs.release-tag }} 35 | env: 36 | NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN_SECRET}} -------------------------------------------------------------------------------- /.github/workflows/sponsors.yml: -------------------------------------------------------------------------------- 1 | name: Generate Sponsors README 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: 30 15 * * 0-6 6 | jobs: 7 | deploy: 8 | runs-on: ubuntu-22.04 9 | steps: 10 | - name: Checkout 🛎️ 11 | uses: actions/checkout@v2 12 | 13 | - name: Generate Sponsors 💖 14 | uses: JamesIves/github-sponsors-readme-action@v1 15 | with: 16 | organization: true 17 | maximum: 500 18 | fallback: '

Sponsors

' 19 | token: ${{ secrets.SPONSORS_README_ACTION_PERSONAL_ACCESS_TOKEN }} 20 | marker: 'supporters' 21 | template: '{{{ login }}}  ' 22 | file: 'README.md' 23 | 24 | - name: Deploy to GitHub Pages 🚀 25 | uses: JamesIves/github-pages-deploy-action@v4 26 | with: 27 | branch: main 28 | folder: '.' -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | /node_modules/ 3 | .env* -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | tools/ 2 | conf/ 3 | cache/ 4 | docs/ 5 | .env* 6 | .github/ 7 | tools/ -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | At the moment Spin is only supported to the very latest commit. We combine that with our fast response to incidents, so risk is minimized. 5 | 6 | | Version | Supported | 7 | |:-------------- |:------------------ | 8 | | main | :white_check_mark: | 9 | | other commits | :x: | 10 | 11 | ## Reporting a Vulnerability 12 | 13 | 14 | **Do not open an issue or Pull Request directly**, because it might reveal the vulnerability. 15 | 16 | If you have a vulnerability to report, please follow [our responsible disclosure policy](https://www.notion.so/Responsible-Disclosure-Policy-421a6a3be1714d388ebbadba7eebbdc8). 17 | -------------------------------------------------------------------------------- /cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "serversideup/spin", 3 | "description": "Replicate your production environment locally using Docker. Just run \"spin up\". It's really that easy.", 4 | "bin": [ 5 | "bin/spin" 6 | ], 7 | "authors": [ 8 | { 9 | "name": "Dan Pastori", 10 | "homepage": "https://twitter.com/danpastori" 11 | }, 12 | { 13 | "name": "Jay Rogers", 14 | "homepage": "https://twitter.com/jaydrogers" 15 | } 16 | ], 17 | "type": "library", 18 | "license": "GPL-3.0-or-later", 19 | "require": {}, 20 | "archive": { 21 | "exclude": [".github", "docs", "tools"] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /conf/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !spin.example.conf -------------------------------------------------------------------------------- /conf/spin.example.conf: -------------------------------------------------------------------------------- 1 | # Set to "beta" if you want to use the beta channel 2 | TRACK=stable -------------------------------------------------------------------------------- /docs/.env.example: -------------------------------------------------------------------------------- 1 | BASE_PATH=http://localhost:3000/open-source/spin 2 | NUXT_APP_BASE_URL=/open-source/spin 3 | TOP_LEVEL_DOMAIN=http://localhost:3000 -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log* 3 | .nuxt 4 | .nitro 5 | .cache 6 | .output 7 | .env 8 | dist 9 | -------------------------------------------------------------------------------- /docs/.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true 2 | strict-peer-dependencies=false 3 | -------------------------------------------------------------------------------- /docs/.nvmrc: -------------------------------------------------------------------------------- 1 | 20 -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Documentation & Static Site, generated with Nuxt Content 2 | This is a documentation site built on top of Nuxt Content (v3). 3 | 4 | # Docs location 5 | All docs are located in the [./content](./content/docs) folder if you're just looking for the docs in plain text. 6 | 7 | ## Setup 8 | 9 | Ensure you're in the right directory. 10 | 11 | ```bash 12 | cd docs/ 13 | ``` 14 | 15 | Copy over the environment variable example file. 16 | 17 | ```bash 18 | cp .env.example .env 19 | ``` 20 | 21 | Make sure to install the dependencies: 22 | 23 | ```bash 24 | yarn install 25 | ``` 26 | 27 | ## Development Server 28 | 29 | Start the development server on http://localhost:3000 30 | 31 | ```bash 32 | yarn dev 33 | ``` 34 | 35 | ## Production 36 | 37 | Build the application for production: 38 | 39 | ```bash 40 | yarn build 41 | ``` 42 | 43 | Locally preview production build: 44 | 45 | ```bash 46 | yarn preview 47 | ``` 48 | 49 | Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. 50 | -------------------------------------------------------------------------------- /docs/assets/css/animations.css: -------------------------------------------------------------------------------- 1 | .slide-in-right-enter-active { 2 | -webkit-animation: slide-in-right 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both; 3 | animation: slide-in-right 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both; 4 | } 5 | 6 | .slide-in-right-leave-active { 7 | -webkit-animation: slide-in-right 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both reverse; 8 | animation: slide-in-right 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both reverse; 9 | } 10 | 11 | @-webkit-keyframes slide-in-right { 12 | 0% { 13 | -webkit-transform: translateX(1000px); 14 | transform: translateX(1000px); 15 | opacity: 0; 16 | } 17 | 100% { 18 | -webkit-transform: translateX(0); 19 | transform: translateX(0); 20 | opacity: 1; 21 | } 22 | } 23 | @keyframes slide-in-right { 24 | 0% { 25 | -webkit-transform: translateX(1000px); 26 | transform: translateX(1000px); 27 | opacity: 0; 28 | } 29 | 100% { 30 | -webkit-transform: translateX(0); 31 | transform: translateX(0); 32 | opacity: 1; 33 | } 34 | } 35 | 36 | .slide-in-top-enter-active { 37 | -webkit-animation: slide-in-top 0.25s cubic-bezier(0.250, 0.460, 0.450, 0.940) both; 38 | animation: slide-in-top 0.25s cubic-bezier(0.250, 0.460, 0.450, 0.940) both; 39 | } 40 | 41 | .slide-in-top-leave-active { 42 | -webkit-animation: slide-in-top 0.25s cubic-bezier(0.250, 0.460, 0.450, 0.940) both reverse; 43 | animation: slide-in-top 0.25s cubic-bezier(0.250, 0.460, 0.450, 0.940) both reverse; 44 | } 45 | 46 | @-webkit-keyframes slide-in-top { 47 | 0% { 48 | -webkit-transform: translateY(-1000px); 49 | transform: translateY(-1000px); 50 | opacity: 0; 51 | } 52 | 100% { 53 | -webkit-transform: translateY(0); 54 | transform: translateY(0); 55 | opacity: 1; 56 | } 57 | } 58 | @keyframes slide-in-top { 59 | 0% { 60 | -webkit-transform: translateY(-1000px); 61 | transform: translateY(-1000px); 62 | opacity: 0; 63 | } 64 | 100% { 65 | -webkit-transform: translateY(0); 66 | transform: translateY(0); 67 | opacity: 1; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /docs/assets/css/docsearch.css: -------------------------------------------------------------------------------- 1 | button.DocSearch-Button{ 2 | background: transparent; 3 | font-family: "Inter", sans-serif; 4 | border-radius: 4px; 5 | margin: 0px; 6 | } 7 | 8 | button.DocSearch-Button .DocSearch-Search-Icon{ 9 | margin-right: 8px; 10 | width: 20px; 11 | height: 20px; 12 | stroke-width: 2; 13 | stroke-linecap: round; 14 | stroke-linejoin: round; 15 | color: #CBD5E1; 16 | } 17 | 18 | button.DocSearch-Button .DocSearch-Button-Placeholder{ 19 | font-weight: bold; 20 | color: rgb(203, 213, 225); 21 | font-size: 0.875rem/* 14px */; 22 | line-height: 1.5rem/* 24px */; 23 | padding: 0px; 24 | display: none; 25 | } 26 | 27 | @media (min-width: 1024px) { 28 | button.DocSearch-Button .DocSearch-Button-Placeholder{ 29 | display: block; 30 | } 31 | } 32 | 33 | @media (min-width: 1280px) { 34 | button.DocSearch-Button .DocSearch-Button-Placeholder{ 35 | font-size: 1.125rem/* 18px */; 36 | line-height: 1.75rem/* 28px */; 37 | } 38 | } 39 | 40 | button.DocSearch-Button:hover, 41 | button.DocSearch-Button:active, 42 | button.DocSearch-Button:focus { 43 | background: rgb(17, 24, 39); 44 | box-shadow: none; 45 | } 46 | 47 | button.DocSearch-Button .DocSearch-Button-Keys{ 48 | display: none; 49 | } 50 | -------------------------------------------------------------------------------- /docs/assets/css/hamburger.css: -------------------------------------------------------------------------------- 1 | #nav-icon span { 2 | display: block; 3 | position: absolute; 4 | height: 2px; 5 | width: 50%; 6 | background: #FFF; 7 | opacity: 1; 8 | -webkit-transform: rotate(0deg); 9 | -moz-transform: rotate(0deg); 10 | -o-transform: rotate(0deg); 11 | transform: rotate(0deg); 12 | -webkit-transition: .25s ease-in-out; 13 | -moz-transition: .25s ease-in-out; 14 | -o-transition: .25s ease-in-out; 15 | transition: .25s ease-in-out; 16 | } 17 | 18 | #nav-icon span:nth-child(even) { 19 | left: 50%; 20 | border-radius: 0 9px 9px 0; 21 | } 22 | 23 | #nav-icon span:nth-child(odd) { 24 | left:0px; 25 | border-radius: 9px 0 0 9px; 26 | } 27 | 28 | #nav-icon span:nth-child(1), #nav-icon span:nth-child(2) { 29 | top: 0px; 30 | } 31 | 32 | #nav-icon span:nth-child(3), #nav-icon span:nth-child(4) { 33 | top: 6px; 34 | } 35 | 36 | #nav-icon span:nth-child(5), #nav-icon span:nth-child(6) { 37 | top: 12px; 38 | } 39 | 40 | #nav-icon.open span:nth-child(1),#nav-icon.open span:nth-child(6) { 41 | -webkit-transform: rotate(45deg); 42 | -moz-transform: rotate(45deg); 43 | -o-transform: rotate(45deg); 44 | transform: rotate(45deg); 45 | } 46 | 47 | #nav-icon.open span:nth-child(2),#nav-icon.open span:nth-child(5) { 48 | -webkit-transform: rotate(-45deg); 49 | -moz-transform: rotate(-45deg); 50 | -o-transform: rotate(-45deg); 51 | transform: rotate(-45deg); 52 | } 53 | 54 | #nav-icon.open span:nth-child(1) { 55 | left: 3px; 56 | top: 3px; 57 | } 58 | 59 | #nav-icon.open span:nth-child(2) { 60 | left: calc(50%); 61 | top: 3px; 62 | } 63 | 64 | #nav-icon.open span:nth-child(3) { 65 | left: -50%; 66 | opacity: 0; 67 | } 68 | 69 | #nav-icon.open span:nth-child(4) { 70 | left: 100%; 71 | opacity: 0; 72 | } 73 | 74 | #nav-icon.open span:nth-child(5) { 75 | left: 3px; 76 | top: 10px; 77 | } 78 | 79 | #nav-icon.open span:nth-child(6) { 80 | left: calc(50%); 81 | top: 10px; 82 | } -------------------------------------------------------------------------------- /docs/assets/css/tailwind.css: -------------------------------------------------------------------------------- 1 | @import "animations.css"; 2 | @import "hamburger.css"; 3 | @import "docsearch.css"; 4 | @import 'tailwindcss/base'; 5 | @import 'tailwindcss/components'; 6 | @import 'tailwindcss/utilities'; 7 | ::-webkit-scrollbar { 8 | width: 0px; 9 | height: 0px; 10 | } -------------------------------------------------------------------------------- /docs/components/Docs/Anchor.vue: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /docs/components/Docs/Eyebrow.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | -------------------------------------------------------------------------------- /docs/components/Docs/Footer.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | -------------------------------------------------------------------------------- /docs/components/Docs/Header.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | -------------------------------------------------------------------------------- /docs/components/Docs/Logo.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/Docs/ModeToggle.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /docs/components/Docs/Navigation.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | -------------------------------------------------------------------------------- /docs/components/Docs/NavigationGroup.vue: -------------------------------------------------------------------------------- 1 | 51 | 52 | -------------------------------------------------------------------------------- /docs/components/Docs/PageLink.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | -------------------------------------------------------------------------------- /docs/components/Docs/Search.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /docs/components/Docs/SmallPrint.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | -------------------------------------------------------------------------------- /docs/components/Docs/Tag.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /docs/components/Docs/TopLevelNavItem.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 13 | -------------------------------------------------------------------------------- /docs/components/DocumentDrivenNotFound.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /docs/components/Icons/Anchor.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/Icons/Arrow.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /docs/components/Icons/ChatBubbleIcon.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | -------------------------------------------------------------------------------- /docs/components/Icons/Check.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/Icons/CheckIcon.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | -------------------------------------------------------------------------------- /docs/components/Icons/ClipboardIcon.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/Icons/EnvelopeIcon.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/Icons/Moon.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/Icons/Resource.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /docs/components/Icons/Search.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/Icons/Social/Discord.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/Icons/Social/GitHub.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/Icons/Social/Twitter.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/Icons/Sun.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/Icons/UserIcon.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/Icons/UsersIcon.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/AppButton.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | -------------------------------------------------------------------------------- /docs/components/content/AppHeading2.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | -------------------------------------------------------------------------------- /docs/components/content/AppHeading3.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /docs/components/content/AppHeading4.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /docs/components/content/AppLink.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | -------------------------------------------------------------------------------- /docs/components/content/Code/ClipboardIcon.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/Code/CopyButton.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | -------------------------------------------------------------------------------- /docs/components/content/Code/PanelHeader.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | -------------------------------------------------------------------------------- /docs/components/content/CodePanel.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | -------------------------------------------------------------------------------- /docs/components/content/Column.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /docs/components/content/DiscordIcon.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/DocsIcon.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/GitHubIcon.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/GridPattern.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 40 | -------------------------------------------------------------------------------- /docs/components/content/Guide.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | -------------------------------------------------------------------------------- /docs/components/content/Guides.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /docs/components/content/HeartIcon.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/HeroPattern.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 31 | -------------------------------------------------------------------------------- /docs/components/content/HubMain.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | -------------------------------------------------------------------------------- /docs/components/content/InfoIcon.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/LeadP.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /docs/components/content/MarketingGetStarted.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/MarketingHero.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | -------------------------------------------------------------------------------- /docs/components/content/MarketingServers.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/MarketingVideo.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/NotProse.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/Note.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/Properties.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/Property.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | -------------------------------------------------------------------------------- /docs/components/content/Resources.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 67 | 68 | -------------------------------------------------------------------------------- /docs/components/content/Resources/Pattern.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | -------------------------------------------------------------------------------- /docs/components/content/Resources/Resource.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | -------------------------------------------------------------------------------- /docs/components/content/Resources/ResourceIcon.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /docs/components/content/ResponsiveImage.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /docs/components/content/Row.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/components/content/VideoEmbed.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /docs/composables/states.ts: -------------------------------------------------------------------------------- 1 | export const usePreferredProgrammingLanguage = () => useState('programming-language', () => '') -------------------------------------------------------------------------------- /docs/content/docs/1.index.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: 'The ultimate open-source solution for managing your server environments from development to production. Simple, lightweight, and fast. Based on Docker.' 3 | head.title: 'Introduction - Spin - Server Side Up' 4 | title: 'Introduction' 5 | layout: docs 6 | --- 7 | 8 | # Welcome to Spin 👋 9 | 10 |

11 | 14 |

15 | 16 | ::lead-p 17 | Spin is one of the fastest ways to create a new project and ship to any host of your choice -- all running **100% the exact same configuration across all environments**. Think of Spin as **Laravel Sail, but you can ship your configuration to production**. 18 | :: 19 | 20 | Choose any host, easily provision and maintain your servers, and ship your application with confidence. 21 | 22 | ::feature-grid 23 | :: -------------------------------------------------------------------------------- /docs/content/docs/1.installation/1.install-macos.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Install to macOS - Spin by Server Side Up' 3 | title: 'Install to macOS' 4 | description: 'Learn how to install Spin on macOS. No root access required.' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/installation/install-macos 7 | --- 8 | 9 | # Install to macOS 10 | ::lead-p 11 | Spin easily runs on any macOS machine that runs Docker Desktop. Getting started is as simple as installing Docker Desktop, then running a single command to install `spin`. 12 | :: 13 | 14 | ## Install Docker Desktop 15 | MacOS does not ship with Docker by default. To get Docker installed, you will need "Docker Desktop", which is the official desktop tool developed by Docker. 16 | 17 | [Learn how to install Docker Desktop →](https://docs.docker.com/desktop/mac/install/) 18 | 19 | ## Download and install `spin` 20 | Once Docker is installed, you are now ready to install `spin`. Run the installer with this simple command in your terminal. **No root permissions required.** 21 | 22 | ::code-panel 23 | --- 24 | label: Install spin to your machine (no root permissions required) 25 | --- 26 | ```bash 27 | bash -c "$(curl -fsSL https://raw.githubusercontent.com/serversideup/spin/main/tools/install.sh)" 28 | ``` 29 | :: 30 | 31 | The above script will install spin at the _user_ level in `~/.spin`, using less than 300KB of storage. 32 | 33 | ::note 34 | Spin will prompt you if you want Spin to modify your PATH variable. If you press "Yes" follow the instructions on the screen. If you press "No" you will need to manually add Spin to your PATH. 35 | :: 36 | 37 | 38 | ## Configuring your PATH variable manually 39 | If you did not add `spin` to your PATH during the installation, you can manually add it to your PATH by adding this to your shell profile: 40 | 41 | ::note 42 | Run `echo $0` in your terminal to figure out which shell you are using. 43 | :: 44 | 45 | ::code-panel 46 | --- 47 | label: Add spin to your path 48 | --- 49 | ```bash 50 | # Add this to `~/.zshrc` or `~/.bash_profile` 51 | export PATH="$HOME/.spin/bin:$PATH" 52 | ``` 53 | :: 54 | 55 | In order to apply the changes to your current terminal session, you will need to run the `source` command. 56 | 57 | ::code-panel 58 | --- 59 | label: Use the "source" command to apply your profile changes immediately 60 | --- 61 | ```bash 62 | # If you're using ZSH 63 | source ~/.zshrc 64 | 65 | # If you're using Bash 66 | source ~/.bash_profile 67 | ``` 68 | :: 69 | 70 | ## Validate it's working 71 | You should be able to run this and get a result 🥳 72 | 73 | ::code-panel 74 | --- 75 | label: Confirm spin is working correctly by getting the version 76 | --- 77 | ```bash 78 | spin version 79 | ``` 80 | :: -------------------------------------------------------------------------------- /docs/content/docs/1.installation/4.install-composer.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Install via Composer - Spin by Server Side Up' 3 | title: 'Install via Composer' 4 | description: 'Spin can be installed using Composer, a popular PHP package manager. This enables you to make Spin accessible without other developers doing any steps on their end.' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/installation/install-composer 7 | --- 8 | 9 | # Install via Composer 10 | ::lead-p 11 | Spin can be installed using Composer, a popular PHP package manager. This enables you to make Spin accessible without other developers doing any steps on their end. 12 | :: 13 | 14 | ## Add `spin` to your project with Composer 15 | Installing `spin` at the project level is a great way to deploy `spin` without much configuration from the user's end. [View `spin` on Packagist →](https://packagist.org/packages/serversideup/spin) 16 | 17 | We can use Docker to run `composer` and install it on your project. **Run this command from the parent folder of your project.** 18 | 19 | ::code-panel 20 | --- 21 | label: Install `spin` with Composer 22 | --- 23 | ```bash 24 | docker run --rm -it -v $(pwd):/app composer require serversideup/spin --dev 25 | ``` 26 | :: 27 | 28 | ## Spin is installed 🥳 29 | You should now be able to access `spin` by running: 30 | 31 | ::code-panel 32 | --- 33 | label: Confirm Spin is working 34 | --- 35 | ```bash 36 | bash vendor/bin/spin version 37 | ``` 38 | :: 39 | 40 | ### Bonus Tip: Use an alias 41 | Rather than typing `vendor/bin/spin` every time, you can add a "smart alias", which will check to see if it exists in your `node_modules`, if not, it loads it from the `vendor` folder. 42 | 43 | You can add the following below to your `~/.bash_profile` or your `~/.zshrc`. 44 | 45 | ::code-panel 46 | --- 47 | label: Add to your shell profile (recommended) 48 | --- 49 | ```bash 50 | alias spin='[ -f node_modules/.bin/spin ] && bash node_modules/.bin/spin || bash vendor/bin/spin' 51 | ``` 52 | :: 53 | 54 | You'll now be able to access `spin` from your project root directory. 55 | 56 | ## Initialize Your Project 57 | Once Spin is installed, you can follow the initialization wizard for your project by running `spin init`. 58 | 59 | ::code-panel 60 | --- 61 | label: Initialize Spin with your project 62 | --- 63 | ```bash 64 | spin init 65 | ``` 66 | :: -------------------------------------------------------------------------------- /docs/content/docs/1.installation/5.install-npm-yarn.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Install via NPM/Yarn - Spin by Server Side Up' 3 | title: 'Install via NPM/Yarn' 4 | description: 'Spin can be installed using NPM or Yarn, two popular JavaScript package managers. This enables you to make Spin accessible without other developers doing any steps on their end.' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/installation/install-npm-yarn 7 | --- 8 | 9 | # Install via NPM/Yarn 10 | ::lead-p 11 | Spin can be installed using NPM or Yarn, two popular JavaScript package managers. This enables you to make Spin accessible without other developers doing any steps on their end. 12 | :: 13 | 14 | ## Add `spin` to your project with Yarn/NPM 15 | Installing `spin` at the project level is a great way to deploy `spin` without much configuration from the user's end. [View `spin` on NPM →](https://www.npmjs.com/package/@serversideup/spin) 16 | 17 | We can use Docker to run install `spin` on your project. **Run this command from the parent folder of your project.** 18 | 19 | ::note 20 | The examples below are using `node:latest`. Be sure to change the image name to match your version of Node that you're using for your project. [See available versions →](https://hub.docker.com/_/node/) 21 | :: 22 | 23 | ::code-panel 24 | --- 25 | label: Install `spin` with Yarn + Docker 26 | --- 27 | ```bash 28 | docker run --rm -v $(pwd):/usr/app/src -w /usr/app/src/ node yarn add @serversideup/spin --dev 29 | ``` 30 | :: 31 | 32 | ::code-panel 33 | --- 34 | label: Install `spin` with NPM + Docker 35 | --- 36 | ```bash 37 | docker run --rm -v $(pwd):/usr/app/src -w /usr/app/src/ node npm install @serversideup/spin --dev 38 | ``` 39 | :: 40 | 41 | ## Spin is installed 🥳 42 | You should now be able to access `spin` by running the command below. 43 | 44 | ::code-panel 45 | --- 46 | label: Run `spin` from your project 47 | --- 48 | ```bash 49 | ./node_modules/.bin/spin up 50 | ``` 51 | :: 52 | 53 | ### Bonus Tip: Use an alias 54 | Rather than typing `./node_modules/.bin/spin` every time, you can add a "smart alias", which will check to see if it exists in your `node_modules`, if not, it loads it from the `vendor` folder. 55 | 56 | You can add the following below to your `~/.bash_profile` or your `~/.zshrc`. 57 | 58 | ::code-panel 59 | --- 60 | label: Add to your shell profile (recommended) 61 | --- 62 | ```bash 63 | alias spin='[ -f node_modules/.bin/spin ] && bash node_modules/.bin/spin || bash vendor/bin/spin' 64 | ``` 65 | :: 66 | 67 | You'll now be able to access `spin` from your project root directory. 68 | 69 | ## Initialize Your Project 70 | Once Spin is installed, you can follow the initialization wizard for your project by running `spin init`. 71 | 72 | ::code-panel 73 | --- 74 | label: Initialize Spin with your project 75 | --- 76 | ```bash 77 | spin init 78 | ``` 79 | :: -------------------------------------------------------------------------------- /docs/content/docs/11.community/1.get-help.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Get Help - Spin by Server Side Up' 3 | title: 'Get Help' 4 | description: 'Learn how to get help with Spin.' 5 | layout: docs 6 | --- 7 | 8 | # Get Help 9 | ::lead-p 10 | We're huge believers the product is only as good as the community that supports it. We're here to help you get the most out of Spin. 11 | :: 12 | 13 | ## Ensure you're on the latest version 14 | We're always shipping new features and bug fixes for Spin. Ensure you're on the latest release by checking the [releases page](https://github.com/serversideup/spin/releases). 15 | 16 | You can also run `spin update` to ensure you're on the latest version. 17 | 18 | If you're still having issues, sometimes deleting Spin and reinstalling might be a quick fix because it's so easy to delete and reinstall. 19 | 20 | ## Debugging 21 | If you think you've found a bug in Spin, you can get debug logs by setting the `SPIN_DEBUG` environment variable to `true` before running any commands. 22 | 23 | ::code-panel 24 | --- 25 | label: Set SPIN_DEBUG to true 26 | --- 27 | ```bash 28 | SPIN_DEBUG=true spin version 29 | ``` 30 | :: 31 | 32 | This will show you exactly what Spin is running and these debug logs can help the community help you faster. 33 | 34 | ## Going back to the stable release 35 | Going back to the stable release is as easy as deleting the `~/.spin` directory then following the installation instructions to reinstall Spin. 36 | 37 | ::code-panel 38 | --- 39 | label: Delete Spin and reinstall 40 | --- 41 | ```bash 42 | rm -rf ~/.spin 43 | ``` 44 | :: 45 | 46 | Now follow the installation instructions for your operating system: 47 | 48 | - [Install to macOS](/docs/installation/install-macos) 49 | - [Install to Linux](/docs/installation/install-linux) 50 | - [Install to Windows](/docs/installation/install-windows) 51 | 52 | ## Community Support 53 | If you're still having issues, our community primarily uses [GitHub Discussions](https://github.com/serversideup/spin/discussions) and [Discord](https://serversideup.net/discord) to get help with Spin. 54 | 55 | ## Resources 56 | We offer a number of resources to help you get the most out of Spin: 57 | - **[Website](https://serversideup.net/open-source/spin)** overview of the product. 58 | - **[Docs](https://serversideup.net/open-source/spin/docs)** for a deep-dive on how to use the product. 59 | - **[Discord](https://serversideup.net/discord)** for friendly support from the community and the team. 60 | - **[GitHub Repo](https://github.com/serversideup/spin)** for source code, bug reports, and project management. 61 | - **[Get Professional Help](https://serversideup.net/professional-support)** - If you need video + screen-sharing support, we offer that too. 62 | -------------------------------------------------------------------------------- /docs/content/docs/11.community/2.testing.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Testing New Releases - Spin by Server Side Up' 3 | title: 'Testing New Releases' 4 | description: 'Learn how to test new releases of Spin.' 5 | layout: docs 6 | --- 7 | 8 | # Testing New Releases 9 | ::lead-p 10 | Spin is a collection of many open source projects built by the Server Side Up community. If you're looking for the latest features, here is how you can help test them out. 11 | :: 12 | 13 | ## Installing latest Spin beta release 14 | Spin is very lightweight and is installed to your `~/.spin` directory by default. If you'd like to install the latest beta, we can easily 15 | 16 | ::code-panel 17 | --- 18 | label: Install latest Spin beta release 19 | --- 20 | ```bash 21 | # Ensure previous installation is removed 22 | rm -rf ~/.spin 23 | 24 | # Install the latest release (regardless of pre-release or stable) 25 | bash -c "$(curl -fsSL https://raw.githubusercontent.com/serversideup/spin/main/tools/install.sh)" "" --beta 26 | ``` 27 | :: 28 | 29 | ## Going back to the stable release 30 | Going back to the stable release is as easy as deleting the `~/.spin` directory then following the installation instructions to reinstall Spin. 31 | 32 | ::code-panel 33 | --- 34 | label: Delete the ~/.spin directory 35 | --- 36 | ```bash 37 | rm -rf ~/.spin 38 | ``` 39 | :: 40 | 41 | Now follow the installation instructions for your operating system: 42 | 43 | - [Install to macOS](/docs/installation/install-macos) 44 | - [Install to Linux](/docs/installation/install-linux) 45 | - [Install to Windows](/docs/installation/install-windows) 46 | 47 | ## Repositories 48 | There are many repositories that are part of the Spin project. Refer to each repository for instructions on how to test the latest changes. 49 | 50 | #### Ansible Collection 51 | - [Spin Ansible Collection](https://github.com/serversideup/ansible-collection-spin) - Used to provision and maintain your production server. 52 | 53 | #### GitHub Actions 54 | - [serversideup/docker-build-action](https://github.com/marketplace/actions/docker-build-action) - A simplified syntax to build and publish your Docker images with GitHub Actions. 55 | - [serversideup/docker-swarm-deploy-github-action](https://github.com/marketplace/actions/docker-swarm-deploy-github-action) - A simplified syntax to deploy to Docker Swarm Mode via GitHub Actions. 56 | 57 | #### Docker Images 58 | - [serversideup/php](https://serversideup.net/open-source/docker-php/) - PHP Docker images highly optimized to work with Laravel + Spin. 59 | - [serversideup/docker-ssh](https://github.com/serversideup/docker-ssh) - A lightweight docker image that runs SSH. This is a fantastic method on using a secure SSH tunnel into your database cluster. 60 | - [serversideup/docker-ansible](https://github.com/serversideup/docker-ansible) - A lightweight docker image that runs Ansible. This allows users to provision their server without needing to know how to install or maintain their Ansible installation. 61 | - [serversideup/docker-github-cli](https://github.com/serversideup/docker-github-cli) - A lightweight docker image that runs GitHub CLI. This allows users to interact with GitHub without needing to install the GitHub CLI on their machine. -------------------------------------------------------------------------------- /docs/content/docs/11.community/3.contributing.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Contributing - Spin by Server Side Up' 3 | title: 'Contributing' 4 | description: 'Learn how to contribute to Spin.' 5 | layout: docs 6 | --- 7 | # Contributing 8 | ::lead-p 9 | We're beyond grateful for your interest in contributing to the Spin project. We're always looking for ways to improve the project and we're excited to see what you have to offer. 10 | :: 11 | 12 | ## Before submitting a PR 13 | - Please be intentional and clear in your proposal 14 | - If you're looking to add a new feature, it may be a good idea to open an issue first to discuss the feature 15 | 16 | ## Improving the documentation 17 | All docs are located under `docs/`. In there is a "Nuxt Content" site. Read `docs/README.md` for more information on how to run the docs locally. 18 | 19 | ## Installing a local development copy of Spin 20 | If you'd like to install a copy for development, clone your fork and add this to your shell profile: 21 | 22 | ::code-panel 23 | --- 24 | label: Add an alias to your shell profile 25 | --- 26 | ```bash 27 | export PATH="/path/to/the-project/spin/bin:$PATH" 28 | ``` 29 | :: 30 | 31 | You you point `spin` on to your project, you'll be able to easily test changes before submitting a pull request. 32 | 33 | ## Development dependencies 34 | Other than having a working Docker Desktop or Docker Engine installation -- the only other dependency is running Bash v3 or higher. This means there literally are not any other dependencies to install. 🥳 35 | 36 | ## Installing a specific version of Spin by the branch 37 | The install script allows you to install a specific branch of Spin. This is useful if you want to test a new feature or bug fix before it's released. 38 | 39 | ::note 40 | If the install command is the feature being changed/tested, change the `https://raw.githubusercontent.com/serversideup/spin/main/tools/install.sh` to the branch you're testing. 41 | :: 42 | 43 | ::code-panel 44 | --- 45 | label: Install a test version of Spin 46 | --- 47 | ```bash 48 | BRANCH="release/2.0" bash -c "$(curl -fsSL -H "Cache-Control: no-cache" https://raw.githubusercontent.com/serversideup/spin/main/tools/install.sh)" 49 | ``` 50 | :: 51 | 52 | ::code-panel 53 | --- 54 | label: Testing a local installation script 55 | --- 56 | ```bash 57 | bash -c "$(cat /path/to/the-project/spin/tools/install.sh)" 58 | ``` 59 | :: 60 | 61 | ## Knowing your way around the code 62 | - `bin/spin` - This is the main entry point for the `spin` command. This file is responsible for parsing the arguments and calling the appropriate function. 63 | - `lib/functions.sh` - This file contains all of the functions that are called by `bin/spin`. 64 | - `lib/actions/` - This directory contains all of the actions that are called by `bin/spin`. Each action is a file that contains a function with the same name as the file. For example, `lib/actions/init.sh` contains a function called `init`. This function is called by `bin/spin` when the `init` action is called. -------------------------------------------------------------------------------- /docs/content/docs/2.getting-started/2.create-a-new-project-with-spin.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Create a New Project with Spin - Spin by Server Side Up' 3 | title: 'Create a New Project with Spin' 4 | description: 'Learn how to create a new project with Spin.' 5 | layout: docs 6 | --- 7 | 8 | # Create a project with Spin 9 | ::lead-p 10 | Getting up an running with Spin is very easy. It's recommended to install Spin globally so you can easily create new projects. Follow the installation instructions for [macOS](/docs/installation/install-macos/), [Linux](/docs/installation/install-linux), or [Windows](/docs/installation/install-windows) before continuing. We'll walk you through the process of creating a new Laravel project with Spin. 11 | :: 12 | 13 | ## Finding a project on "Spin Hub" 14 | We created a [community hub](/hub) where you can find templates created by the Spin team and the community. We're in the early stages of development, but [anyone can create their own template](/docs/advanced/create-your-own-template) and we will publish it to Spin Hub for you. 15 | 16 | ## Let's create a new Laravel project 17 | For our example, we will use the "Laravel" template from Spin Hub. We have a command called `spin new`, which will take care of the heavy lifting for you 18 | 19 | ::code-panel 20 | --- 21 | label: "Create a new Laravel project called \"my-billion-dollar-idea\"" 22 | --- 23 | ```bash 24 | spin new laravel my-billion-dollar-idea 25 | ``` 26 | :: 27 | 28 | This will create a project in your current directory called `my-billion-dollar-idea`. You can also specify a path to create the project in a different directory. 29 | 30 |

31 | 34 |

35 | 36 | Assuming you completed the prerequisites, the onboard wizard will take you through the process so you can get a local development environment with `spin up`. 37 | 38 | ## Starting the development environment 39 | Next, we'll start the development environment with `spin up`. 40 | 41 | [Starting up your Development Environment →](/docs/development-environment/starting-up-your-development-environment) -------------------------------------------------------------------------------- /docs/content/docs/2.getting-started/3.add-spin-to-an-existing-project.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Add Spin to an Existing Project - Spin by Server Side Up' 3 | title: 'Add Spin to an Existing Project' 4 | description: 'Learn how to add Spin to an existing project.' 5 | layout: docs 6 | --- 7 | 8 | # Add Spin to an Existing Project 9 | ::lead-p 10 | Adding Spin to an existing project is easy. Everything works through the `spin init` command, we'll ask you a few questions, then you'll be on your way to shipping a 100% replicated application. 11 | :: 12 | 13 | ## Install Spin 14 | We have a number of ways to install Spin. Pick any one. 15 | 16 | - [Install to macOS](/docs/installation/install-macos/) 17 | - [Install to Windows](/docs/installation/install-windows) 18 | - [Install to Linux](/docs/installation/install-linux) 19 | - [Install via Composer](/docs/installation/install-composer) 20 | - [Install via NPM/Yarn](/docs/installation/install-npm-yarn) 21 | 22 | ::note 23 | Moving forward, this guide assumes you configured `spin` as an alias or installed it locally on your machine. 24 | :: 25 | 26 | ## Initialize Spin 27 | Run this command in the root of your project: 28 | 29 | ::code-panel 30 | --- 31 | label: "Initialize Spin" 32 | --- 33 | ```bash 34 | spin init 35 | ``` 36 | :: 37 | 38 | ::note 39 | Each template will have its own special `init` process. Be sure to refer to the project's README file for any steps required after adding Spin to your project. 40 | :: 41 | 42 | You need to replace `` with the name of the template you want to use. You can find available templates under ["Spin Hub"](/hub), which is a collection of templates contributed by the Spin community. 43 | 44 | ## Next Steps 45 | [Start up your development environment →](/docs/development-environment/starting-up-your-development-environment) -------------------------------------------------------------------------------- /docs/content/docs/3.development-environment/1.starting-up-your-development-environment.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Starting Up Your Development Environment - Spin by Server Side Up' 3 | title: 'Starting Up Your Development Environment' 4 | description: 'Learn how to start up your development environment with Spin.' 5 | layout: docs 6 | --- 7 | 8 | # Starting up your Development Environment 9 | ::lead-p 10 | Spin uses Docker Compose to start up your development environment in a single command. This allows you to exactly replicate your production environment for local development. 11 | :: 12 | 13 |

14 | 17 |

18 | 19 | ## Prerequisites 20 | - Docker is installed and running. 21 | - Spin is installed to your system or to your project (via composer or as a node dependency). 22 | 23 | ## Ensure your application dependencies are installed 24 | Before you can bring up your development environment, you need to ensure your application dependencies are installed. 25 | 26 | ::note 27 | If you just ran `spin new` to create a project, the application dependencies will already be installed. You can skip this step. 28 | :: 29 | 30 | ::code-panel 31 | --- 32 | label: Install dependencies (this depends on your project) 33 | --- 34 | ```bash 35 | # PHP dependencies 36 | spin run php composer install 37 | 38 | # Node dependencies 39 | spin run node yarn install 40 | ``` 41 | :: 42 | 43 | ## Bring up your development environment 44 | Once your dependencies are installed, you can bring up your development environment with the following command: 45 | 46 | ::note 47 | Make sure to run this command from your project directory. 48 | :: 49 | 50 | ::code-panel 51 | --- 52 | label: Bring up your development environment 53 | --- 54 | ```bash 55 | spin up 56 | ``` 57 | :: 58 | 59 | ::note 60 | To stop your development environment, press `Ctrl+C`. 61 | :: 62 | 63 | Since Spin is running Docker Compose, you can also pass any argument to the `up` command. For example, `spin up -d` will start your development environment in detached mode. See the full documentation for [spin up](/docs/command-reference/up) for more information. 64 | 65 | ## Accessing your development environment 66 | In order to access your development environment, review the README of the template you're using. Each template has different instructions on how to access the services. 67 | -------------------------------------------------------------------------------- /docs/content/docs/3.development-environment/2.running-commands-in-development.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Running Commands in Development - Spin by Server Side Up' 3 | title: 'Running Commands in Development' 4 | description: 'Learn how to run commands in your development environment with Spin.' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/development-environment/running-commands-in-development 7 | --- 8 | 9 | # Running Commands in Development 10 | ::lead-p 11 | Spin makes it easy to run commands in your development environment by following the Docker Compose CLI syntax. 12 | :: 13 | 14 | ## How to run commands in development 15 | You have two options to run commands in your development environment: 16 | 17 | 1. [`spin exec`](/docs/command-reference/exec) - This executes commands in an EXISTING container (and requires that service to be already running with `spin up`). 18 | 2. [`spin run`](/docs/command-reference/run) - This executes commands in a NEW container, then exits. 19 | 20 | For example, let's say you want to run `composer install` in your development environment for Laravel, you would use the following command: 21 | 22 | ::note 23 | If you have `spin up` running in a terminal window, you will need to run the `spin run` or `spin exec` command in a new terminal window from your project directory. 24 | :: 25 | 26 | ::code-panel 27 | --- 28 | label: Run a command in a new container 29 | --- 30 | ```bash 31 | # Usage: spin run 32 | spin run php composer install 33 | ``` 34 | :: 35 | 36 | ::code-panel 37 | --- 38 | label: Execute a command in an existing container 39 | --- 40 | ```bash 41 | # Usage: spin exec 42 | spin exec php composer install 43 | ``` 44 | :: 45 | 46 | Take note of the syntax. You specify the service you want to run the command in, then the command you want to run. The same is true for `spin exec`. 47 | 48 | ## When to use `spin exec` vs `spin run` 49 | In development, it's often easier to use `spin run` because it will create a new container and then exit. This is faster than having to start the container with `spin up` and then use `spin exec`. 50 | 51 | If you have something that you specifically need to run in an already running container, then you should use `spin exec`. -------------------------------------------------------------------------------- /docs/content/docs/6.deployment/1.choosing-a-deployment-strategy.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Choosing a Deployment Strategy - Spin by Server Side Up' 3 | title: 'Choosing a Deployment Strategy' 4 | description: 'Learn how to choose a deployment strategy for your application with Spin.' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/deployment/choosing-a-deployment-strategy 7 | --- 8 | 9 | # Choosing a Deployment Strategy 10 | ::lead-p 11 | Spin supports automated deployments and very simple deployments from your local machine. You can choose between these two strategies depending on your needs. 12 | :: 13 | 14 | ## Types of Deployments 15 | There are two types of deployments: 16 | 17 | 1. **Simple Deployments from your local machine** - We can use the [`spin deploy`](/docs/command-reference/deploy) command to deploy your application from your local machine to your server. 18 | 2. **Automated Deployments** - You can use our GitHub Actions to help you automatically deploy your application when you push to GitHub. 19 | 20 | | | spin deploy | GitHub Actions | 21 | |-------------------------|----------------------|-------------------------| 22 | | Difficulty | Very Easy | Basic Understanding of SSH & GitHub Actions required | 23 | | Team Size | Solo-developers | Small to very large teams | 24 | | Zero-downtime Deployments | ✅ | ✅ | 25 | | Automated Deployments | ❌ | ✅ | 26 | 27 | Automated deployments are recommended for teams because they standardize the deployment process without human interaction. If you're a solo developer, you may find that [`spin deploy`](/docs/command-reference/deploy) is so easy to use you'll never need to learn the complexities of CI/CD or GitHub Actions. 28 | 29 | ## Simple Deployments from your local machine 30 | To learn more about our simple deployments from your local machine, see the guide below. 31 | 32 | [Simple Deployments from your local machine →](/docs/deployment/using-spin-deploy) 33 | 34 | ## Automated Deployments with GitHub Actions 35 | To learn more about our automated deployments, see the guide below. 36 | 37 | [Automated Deployments with GitHub Actions →](/docs/deployment/automated-deployments-with-github-actions) -------------------------------------------------------------------------------- /docs/content/docs/6.deployment/2.automated-deployments-with-github-actions.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Automated Deployments with GitHub Actions - Spin by Server Side Up' 3 | title: 'Automated Deployments with GitHub Actions' 4 | description: 'Learn how to automate deployments with GitHub Actions.' 5 | layout: docs 6 | --- 7 | 8 | # Automated Deployments with GitHub Actions 9 | ::lead-p 10 | Spin is compatible with any CI/CD that can build Docker images and run SSH commands on a remote server. In this guide, we cover the tools available to help make your deployments through GitHub Actions easier. 11 | :: 12 | 13 | ::note 14 | **Looking for the easiest way to automated Laravel deployments?**

We offer a [Spin Pro template](https://getspin.pro) that is a "turn-key" solution for Laravel deployments. All of this will be automated for you and you won't need to spend any time learning the complexities of GitHub Actions. 😃 15 | :: 16 | 17 | ## Important concepts 18 | **Zero-downtime deployments highly depend on your configuration with Docker.** For a zero-downtime deployment to work, there are many things that need to align in order for this to happen: 19 | 20 | - A properly configured reverse proxy (like Traefik) and/or load balancer must be configured 21 | - This reverse proxy or load balancer must be able to access your container via the Docker Swarm Service 22 | - Container health checks must be implemented 23 | - Health checks must have an accurate definition of "healthy" 24 | - Services must gracefully shut down 25 | - Container update configurations must be properly set for Docker Swarm 26 | - A CI/CD runner must be configured to build a container, upload it to a registry, and have SSH access to trigger a deployment procedure 27 | 28 | Spin's official templates provide containers that are ready for zero-downtime deployments out of the box. 29 | 30 | ![GitHub Actions: Zero-downtime Deployment](/images/docs/github-actions/zero-downtime-deployment.png) 31 | 32 | ## Open Source GitHub Actions 33 | Even if you decide to not use the Spin Pro template, we offer our GitHub Actions as open source tools to help you deploy your application with Spin. 34 | 35 | - [serversideup/docker-build-action](https://github.com/marketplace/actions/docker-build-action) - A simplified syntax to build and publish your Docker images with GitHub Actions. 36 | - [serversideup/docker-swarm-deploy-github-action](https://github.com/marketplace/actions/docker-swarm-deploy-github-action) - A simplified syntax to deploy to Docker Swarm Mode via GitHub Actions. 37 | 38 | Each GitHub Action has it's own documentation on how you can implement it into your workflow. 39 | 40 | ## Security Considerations 41 | Be aware that you're taking a sensitive deployment key, putting that into GitHub actions, and allowing SSH connections from anywhere to connect to your production server. If you want to further harden your server, you may consider: 42 | 43 | - Deploying your own Self-hosted GitHub Runner 44 | - Locking down SSH access to your server from specific IP addresses 45 | 46 | ## The easiest way to deploy your Laravel application 47 | If you're looking for the easiest way to deploy your Laravelapplication, we highly recommend using the [Spin Pro template](https://getspin.pro). This template includes a "turn-key" solution for Laravel deployments that is fully automated and requires minimal knowledge of GitHub Actions or Docker. 48 | 49 | [Learn more about Spin Pro →](https://getspin.pro) 50 | -------------------------------------------------------------------------------- /docs/content/docs/6.deployment/3.using-spin-deploy.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Using "spin deploy" - Spin by Server Side Up' 3 | title: 'Using "spin deploy"' 4 | description: 'Learn how to use the "spin deploy" command to deploy your application from your local machine to your server.' 5 | layout: docs 6 | --- 7 | 8 | # Using "spin deploy" 9 | ::lead-p 10 | The `spin deploy` command is the easiest way to deploy your application without downtime while avoiding the complexities of learning CI/CD or GitHub Actions. 11 | :: 12 | 13 | ## When "spin deploy" is the right choice 14 | We created `spin deploy` for the solo developer who wants an easy way to quickly deploy their application without the burden of learning CI/CD or GitHub Actions. If you're on a larger team or share your application with many developers, we highly recommend coming up with an [automated deployment strategy](/docs/deployment/automated-deployments-with-github-actions). 15 | 16 | ## How "spin deploy" works 17 | It's quite brilliant how `spin deploy` works. When you run this command, it will build your application locally with Docker, upload it to a temporary registry running on your machine, establish an SSH tunnel to your server, then have your server pull the new image from your local machine without any downtime. 18 | 19 | All of this is completed in one command without you needing to know how to configure Docker registries, CI/CD tools, or anything else. 🤯 20 | 21 | ![Spin Deploy](/images/docs/whats-spin/spin-deploy.png) 22 | 23 | ## Learn more about "spin deploy" 24 | To learn more about the `spin deploy` command, see the guide below. 25 | 26 | [Learn more about "spin deploy" →](/docs/command-reference/deploy) 27 | -------------------------------------------------------------------------------- /docs/content/docs/7.server-access/1.connecting-to-your-server.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Connecting to Your Server - Spin by Server Side Up' 3 | title: 'Connecting to Your Server' 4 | description: 'Learn how to connect to your server.' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/server-access/connecting-to-your-server 7 | --- 8 | 9 | # Connecting to Your Server 10 | ::lead-p 11 | Spin eliminates the headache of understanding the intricacies of configuring a secure SSH connection. After you provision your server, connecting and managing your server is a breeze. 12 | :: 13 | 14 | ## Connect to your server 15 | To connect to your server, you can use the `spin ssh` command. 16 | 17 | ::code-panel 18 | --- 19 | label: Connect to your server 20 | --- 21 | ```bash 22 | ssh @
23 | ``` 24 | :: 25 | 26 | If you use the same username on your host machine as the username on your server, you can omit the username from the command. 27 | 28 | ## Deploying your application to your server 29 | To deploy the application to your server, you can choose between different deployment strategies. 30 | 31 | [Learn more about deployment strategies →](/docs/deployment/choosing-a-deployment-strategy) 32 | 33 | ## Troubleshooting your application 34 | If you run into any issues with your application, we've compiled a guide to help you view and troubleshoot your application. 35 | 36 | [Troubleshooting your application →](/docs/server-access/troubleshooting-your-application) 37 | 38 | ## Updating your server 39 | Keeping your server up to date is important for security and performance. We've compiled a guide to show how easy it is to update your server. 40 | 41 | [Updating your server →](/docs/server-access/updating-your-server) 42 | -------------------------------------------------------------------------------- /docs/content/docs/7.server-access/3.updating-your-server.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Updating Your Server - Spin by Server Side Up' 3 | title: 'Updating Your Server' 4 | description: 'Learn how to update your server.' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/server-access/updating-your-server 7 | --- 8 | 9 | # Updating Your Server 10 | ::lead-p 11 | Keeping your server up to date is important for security and performance. Spin makes it stupid-easy to update your server. 12 | :: 13 | 14 | ## Background 15 | Running an out of date server stack can lead to security vulnerabilities and performance issues. Spin makes it easy to keep your server up to date. There are two categories of updates: 16 | 17 | - Application Stack Updates 18 | - Server Updates 19 | 20 | `spin maintain` focuses on *server updates*. Here's a quick look at what that looks like: 21 | 22 | ![Spin Maintain Command](/images/docs/whats-spin/spin-maintain.png) 23 | 24 | ### Application Stack Updates 25 | What we mean by application stack updates are things like Redis, Postgres, Node, PHP, etc. These are things you'll want to look at in your `docker-compose.*.yml`, `composer.json`, `package.json`, etc. Whenever you make a change, it will be version controlled so you can easily test and revert if needed. 26 | 27 | ### Server Updates 28 | Server updates are things like the underlying operating system, Docker, etc. It's important to keep these packages up to date as well. Thankfully Spin includes the [`spin maintain`](/docs/command-reference/maintain) command which will take care of the heavy lifting for you. 29 | 30 | ::note 31 | When you perform maintenance on your server, your server may experience brief downtime if it the updates require a reboot. Be sure to run this command during a communicated maintenance window. 32 | :: 33 | 34 | ::code-panel 35 | --- 36 | label: Upgrade your servers 37 | --- 38 | ```bash 39 | # Update all servers 40 | spin maintain 41 | 42 | # Update a specific environment 43 | spin maintain production 44 | ``` 45 | :: 46 | 47 | The above command will: 48 | 49 | - Connect to your server(s) 50 | - Update the all operating system packages 51 | - Update Docker 52 | - Reboot the server (if needed) 53 | -------------------------------------------------------------------------------- /docs/content/docs/8.advanced/2.generating-a-secure-ssh-key.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Generating a Secure SSH Key - Spin by Server Side Up' 3 | title: 'Generating a Secure SSH Key' 4 | description: 'Learn how to generate a secure SSH key.' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/advanced/generating-a-secure-ssh-key 7 | --- 8 | 9 | # Generating a Secure SSH Key 10 | ::lead-p 11 | Having a secure SSH key is super important. This allows us to authenticate to our servers using keys instead of insecure methods such as passwords. 12 | :: 13 | 14 | A few things about that will make this key secure: 15 | 16 | 1. The [ED25519 encryption](https://ed25519.cr.yp.to/) algorithm 17 | 2. A password protected key (if you password protect your key, you may need to go through additional steps to configure your SSH agent) 18 | 19 | If you want to nerd out on why we suggest this algorithm, you can [read this guide](https://blog.g3rt.nl/upgrade-your-ssh-keys.html). 20 | 21 | 22 | ## 👨‍💻 Generating an SSH key 23 | ::note 24 | If you're using services like GitHub already, there's a good chance you already have a key like this. All you need is the **public key** value of your existing SSH key pair. You can likely find this in your `~/.ssh` directory, and look for files ending in `*.pub`. 25 | 26 | Spin works with any valid SSH key. It does NOT need to be the ED25519 algorithm, just as long as it works with SSH and is secure. 27 | :: 28 | 29 | If you need to create an SSH key, you can run this on your local machine: 30 | 31 | ::code-panel 32 | --- 33 | label: "Generate an SSH key" 34 | --- 35 | ```bash 36 | ssh-keygen -o -a 100 -t ed25519 37 | ``` 38 | :: 39 | 40 | It will create two files: 41 | ::code-panel 42 | --- 43 | label: "Files created" 44 | --- 45 | ```bash 46 | ~/.ssh/id_ed25519 # ❌ This is your PRIVATE key. Keep this secret 47 | ~/.ssh/id_ed25519.pub # ✅ This is your PUBLIC key. This is the value we want to use 48 | ``` 49 | :: 50 | 51 | To get the public key value, you can run this command: 52 | 53 | ::code-panel 54 | --- 55 | label: "Get the public key value" 56 | --- 57 | ```bash 58 | cat ~/.ssh/id_ed25519.pub 59 | ``` 60 | :: 61 | 62 | This will echo the public key value to your terminal. 63 | 64 | ## What to do with this key 65 | You can copy this value and use it in your `.spin.yml` [when you configure your "users.username.authorized_ssh_keys" for your server](/docs/server-configuration/spin-yml-usage#users). -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/base64.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'base64 | Command Reference - Spin by Server Side Up' 3 | title: 'base64' 4 | description: 'Command reference for "spin base64"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/base64 7 | --- 8 | # spin base64 9 | ::lead-p 10 | Encode and decode strings with base64. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin build" 17 | --- 18 | ```bash 19 | spin base64 [OPTIONS] 20 | ``` 21 | :: 22 | 23 | ### Options 24 | - `encode` (or `-e`): Encode a string with base64 25 | - `decode` (or `-d`): Decode a string with base64 26 | 27 | ## Examples 28 | ::code-panel 29 | --- 30 | label: Encode a file with base64 31 | --- 32 | ```bash 33 | spin base64 -e myfile.txt 34 | ``` 35 | :: 36 | 37 | ::code-panel 38 | --- 39 | label: Decode a file with base64 40 | --- 41 | ```bash 42 | spin base64 decode myfile.txt 43 | ``` 44 | :: 45 | 46 | ## Special notes 47 | This command runs the `base64` command on your system, but it standardizes the syntax between Linux and macOS. This means you can use this command on both systems without having to remember the different syntax. -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/build.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'build | Command Reference - Spin by Server Side Up' 3 | title: 'build' 4 | description: 'Command reference for "spin build"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/build 7 | --- 8 | # spin build 9 | ::lead-p 10 | Trigger a build of your docker-compose files. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin build" 17 | --- 18 | ```bash 19 | spin build [OPTIONS] 20 | ``` 21 | :: 22 | ## Official Documentation & Additional Options 23 | This command is a shortcut for [`docker-compose build`](https://docs.docker.com/compose/reference/build/) and can accept additional options that you pass to it. -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/debug.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'debug | Command Reference - Spin by Server Side Up' 3 | title: 'debug' 4 | description: 'Command reference for "spin debug"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/debug 7 | --- 8 | # spin debug 9 | ::lead-p 10 | If you run into an issue with `spin` and need to report a bug, this is a very helpful command that is used to tell the development team a little more about your environment and how you have `spin` configured. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Get debug information for "spin" 17 | --- 18 | ```bash 19 | spin debug 20 | ``` 21 | :: -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/down.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'down | Command Reference - Spin by Server Side Up' 3 | title: 'down' 4 | description: 'Command reference for "spin down"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/down 7 | --- 8 | # spin down 9 | ::lead-p 10 | Stops containers and removes containers, networks, volumes, and images created by up. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin down" 17 | --- 18 | ```bash 19 | spin down [OPTIONS] 20 | ``` 21 | :: 22 | 23 | ## Special notes 24 | This will only run on machines that have `spin` installed on it. This means if you installed `spin` via "composer" or "yarn", this command will **not** execute. -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/exec.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'exec | Command Reference - Spin by Server Side Up' 3 | title: 'exec' 4 | description: 'Command reference for "spin exec"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/exec 7 | --- 8 | # spin exec 9 | ::lead-p 10 | Use `exec` if you want to run a command in **currently running** containers. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin exec" 17 | --- 18 | ```bash 19 | spin exec [OPTIONS] SERVICE COMMAND 20 | ``` 21 | :: 22 | 23 | ## Example 24 | ::code-panel 25 | --- 26 | label: Example of running `php artisan migrate` within the `php` container 27 | --- 28 | ```bash 29 | spin exec php php artisan migrate 30 | ``` 31 | :: 32 | 33 | The above command runs `php artisan migrate` inside of the `php` service (this is why "php" is repeated twice). 34 | 35 | ## Special notes 36 | This will only run on machines that have `spin` installed on it. This means if you installed `spin` via "composer" or "yarn", this command will **not** execute. -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/gh.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'gh | Command Reference - Spin by Server Side Up' 3 | title: 'gh' 4 | description: 'Command reference for "spin gh"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/gh 7 | --- 8 | # spin gh 9 | ::lead-p 10 | Run the GitHub CLI via Docker with Spin. 11 | :: 12 | 13 | ## What this command does 14 | This command will run the GitHub CLI via Docker using [`serversideup/github-cli`](https://github.com/serversideup/docker-github-cli). 15 | 16 | ## Usage 17 | ::code-panel 18 | --- 19 | label: Usage for "spin gh" 20 | --- 21 | ```bash 22 | spin gh [OPTIONS] 23 | ``` 24 | :: 25 | 26 | ## Official Documentation 27 | The `spin gh` command supports running all the commands supported by the GitHub CLI. See the [official documentation](https://cli.github.com/manual/) for more information. 28 | -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/help.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'help | Command Reference - Spin by Server Side Up' 3 | title: 'help' 4 | description: 'Command reference for "spin help"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/help 7 | --- 8 | # spin help 9 | ::lead-p 10 | Get a convenient link to open the documentation for `spin`. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Get help link for Spin 17 | --- 18 | ```bash 19 | spin help 20 | ``` 21 | :: -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/init.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'init | Command Reference - Spin by Server Side Up' 3 | title: 'init' 4 | description: 'Command reference for "spin init"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/init 7 | --- 8 | 9 | # spin init 10 | ::lead-p 11 | Initialize Spin on an existing project. This process will create all the files you need to get started with Spin. 12 | :: 13 | 14 | ::note 15 | This process will create new files and may modify existing files. It's highly recommended you read through our [Add Spin to an Existing Project](/docs/getting-started/add-spin-to-an-existing-project) guide before running this command. 16 | :: 17 | 18 | ## Usage 19 | ::code-panel 20 | --- 21 | label: Usage for "spin init" 22 | --- 23 | ```bash 24 | spin init [--skip-dependency-install] 25 | ``` 26 | :: 27 | 28 | ## What this command does 29 | Running `spin init` will ask you a few questions about your project, then create the files you need to get started with Spin. 30 | 31 | ### Project Types: 32 | - `laravel`: Initialize Spin into an existing Laravel project. 33 | - `laravel-pro`: Initialize [Spin Pro's Laravel Template](https://getspin.pro) into an existing Laravel project with Laravel Pro. 34 | - `nuxt`: Initialize Spin into an existing Nuxt project. 35 | 36 | ### Options 37 | - `--skip-dependency-install`: Skip the installation of dependencies. This is useful if you're using a custom script to install dependencies. -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/kill.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'kill | Command Reference - Spin by Server Side Up' 3 | title: 'kill' 4 | description: 'Command reference for "spin kill"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/kill 7 | --- 8 | # spin kill 9 | ::lead-p 10 | Send `SIGKILL` to all containers. See the documentation on [docker kill](https://docs.docker.com/engine/reference/commandline/kill/) for more advanced usage. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin kill" 17 | --- 18 | ```bash 19 | spin kill 20 | ``` 21 | :: -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/latest.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'latest | Command Reference - Spin by Server Side Up' 3 | title: 'latest' 4 | description: 'Command reference for "spin latest"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/latest 7 | --- 8 | # spin latest 9 | ::lead-p 10 | Run a one-off container to perform a task with the latest version of the container type you specify. This is great when you need to run composer or npm commands outside of a project directory. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin latest" 17 | --- 18 | ```bash 19 | spin latest [OPTIONS] SERVICE COMMAND 20 | ``` 21 | :: 22 | 23 | ### Options 24 | - `php`: Run the latest stable version of PHP 25 | - `node`: Run the latest stable LTS version of Node 26 | 27 | ## Example 28 | ::code-panel 29 | --- 30 | label: Example of running a container for "composer install" with PHP 31 | --- 32 | ```bash 33 | spin latest php php my_script.php 34 | ``` 35 | :: 36 | 37 | The above command will run the latest stable version of `php`, then run the command `php my_script.php` inside the container. The `php` in the command is duplicated because one is the service name name of `php` and the other is the command to run `php` inside the container. -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/logs.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'logs | Command Reference - Spin by Server Side Up' 3 | title: 'logs' 4 | description: 'Command reference for "spin logs"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/logs 7 | --- 8 | # spin logs 9 | ::lead-p 10 | View the logs of your docker project. Helpful if you need to go back in time on your own machine. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin logs" 17 | --- 18 | ```bash 19 | spin logs [OPTIONS] 20 | ``` 21 | :: 22 | 23 | ## Official Documentation & Additional Options 24 | This command is a shortcut for [`docker-compose logs`](https://docs.docker.com/compose/reference/logs/) and can accept additional options that you pass to it. -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/maintain.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'maintain | Command Reference - Spin by Server Side Up' 3 | title: 'maintain' 4 | description: 'Command reference for "spin maintain"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/maintain 7 | --- 8 | # spin maintain 9 | ::lead-p 10 | Apply updates to your inventory of servers. 11 | :: 12 | 13 | ## Usage 14 | ::note 15 | When you perform maintenance on your server, your server may experience brief downtime if it the updates require a reboot. Be sure to run this command during a communicated maintenance window. 16 | :: 17 | 18 | ::code-panel 19 | --- 20 | label: Usage for "spin maintain" 21 | --- 22 | ```bash 23 | spin maintain [environment] [ -p|--port -u|--user -U|--upgrade ] 24 | ``` 25 | :: 26 | 27 | ![Spin Maintain Command](/images/docs/whats-spin/spin-maintain.png) 28 | 29 | ## Checklist before executing this command 30 | Before you execute this command, you should have the following completed: 31 | 32 | - You should have a running **Ubuntu 22.04+ server** with properly configured SSH access 33 | - The `.spin.yml` file should be configured 34 | 35 | ## What this command does 36 | The above command will: 37 | 38 | - Connect to your server(s) 39 | - Update the all operating system packages 40 | - Update Docker 41 | - Reboot the server (if needed) 42 | 43 | ## Options 44 | The following options are available to set when running this command. 45 | | Option | Short | Default | Description | 46 | | --- | --- | --- | --- | 47 | | `environment` | - | `all` | Optional. The target environment to maintain (e.g., `production`, `staging`). | 48 | | `--host` | `-h` | | The hostname or group of hosts you'd like to apply updates to. | 49 | | `--port` | `-p` | `22` | The port to SSH into the server with. | 50 | | `--user` | `-u` | The username of your HOST machine (run `whoami` in a new terminal) | The user to SSH into the server with. | 51 | | `--upgrade` | `-U` | Check for Ansible collection updates once per day. | Force upgrade the Ansible Collection on your machine before applying updates. | -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/mkpasswd.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'mkpasswd | Command Reference - Spin by Server Side Up' 3 | title: 'mkpasswd' 4 | description: 'Command reference for "spin mkpasswd"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/mkpasswd 7 | --- 8 | # spin mkpasswd 9 | ::lead-p 10 | Generate a password hash using the mkpasswd utility. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin mkpasswd" 17 | --- 18 | ```bash 19 | spin mkpasswd [OPTIONS] 20 | ``` 21 | :: 22 | 23 | ## Official Documentation & Additional Options 24 | This command is a shortcut for running [`mkpasswd`](https://linux.die.net/man/1/mkpasswd) with Docker. This is helpful for generating temporary password hashes when configuring your `.spin.yml` file. 25 | 26 | ## Examples 27 | ::code-panel 28 | --- 29 | label: Generate a password hash 30 | --- 31 | ```bash 32 | spin mkpasswd mypassword 33 | ``` 34 | :: 35 | 36 | You can also use "interactive mode" by being prompted to enter a password. This is helpful if you don't want to expose the password in your terminal history. 37 | 38 | ::code-panel 39 | --- 40 | label: Generate a password hash interactively 41 | --- 42 | ```bash 43 | spin mkpasswd 44 | ``` -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/new.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'new | Command Reference - Spin by Server Side Up' 3 | title: 'new' 4 | description: 'Command reference for "spin new"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/new 7 | --- 8 | # spin new 9 | ::lead-p 10 | Create and initialize a new project with Spin. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin new" 17 | --- 18 | ```txt 19 | spin new 20 | ``` 21 | :: 22 | 23 | ::note 24 | `` can either be an "official template" provided by the Spin team, or any GitHub repository in the format of `username/repo`. 25 | :: 26 | 27 | ## Create a new project with Spin installed 28 | Getting started with a new project is easy with Spin. Simply run the `spin new` command followed by your project name and Spin will create a new project for you with Spin installed. 29 | 30 | ## Official Spin Template running Laravel 31 | We only have one official template right now, but we're working to add more templates. This Laravel template that will get you up and running with the latest stable version of Laravel with the default configurations running SQLite. 32 | 33 | #### Repository 34 | - [serversideup/spin-template-laravel-basic](https://github.com/serversideup/spin-template-laravel-basic) 35 | 36 | #### Usage 37 | 38 | ::code-panel 39 | --- 40 | label: Usage for "spin new" 41 | --- 42 | ```txt 43 | spin new laravel 44 | ``` 45 | :: 46 | 47 | ### Optional - Specify your project name 48 | By default, Spin will use the framework's default project name and create the project in the current directory of where you're running Spin. If you'd like to specify your own project name, simply add it as the second argument to the `spin new` command. 49 | 50 | ::code-panel 51 | --- 52 | label: Example of "spin new" with custom project name 53 | --- 54 | ```bash 55 | spin new laravel my-billion-dollar-idea 56 | ``` -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/prune.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'prune | Command Reference - Spin by Server Side Up' 3 | title: 'prune' 4 | description: 'Command reference for "spin prune"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/prune 7 | --- 8 | # spin prune 9 | ::lead-p 10 | Clear the local Docker and Spin caches on your machine. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin prune" 17 | --- 18 | ```bash 19 | spin prune [OPTIONS] 20 | ``` 21 | :: 22 | 23 | ## Options 24 | The following options are available to set when running this command. 25 | | Option | Short | Default | Description | 26 | | --- | --- | --- | --- | 27 | | `--force` | `-f` | `false` | Force the deletion of the local Docker and Spin caches. | 28 | 29 | ## Official Documentation & Additional Options 30 | This command is a shortcut for [`docker system prune --all`](https://docs.docker.com/engine/reference/commandline/system_prune/) and can accept additional options that you pass to it. Spin defaults the `--all` for you already, so no need to add that. 31 | 32 | If you want to clear volumes as well, you will need to add `--volumes` to the end of the command. 33 | 34 | ::code-panel 35 | --- 36 | label: Clear volumes as well as all other containers. 37 | --- 38 | ```bash 39 | spin prune --volumes 40 | ``` 41 | :: -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/ps.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'ps | Command Reference - Spin by Server Side Up' 3 | title: 'ps' 4 | description: 'Command reference for "spin ps"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/ps 7 | --- 8 | # spin ps 9 | ::lead-p 10 | Lists containers for a Compose project, with current status and exposed ports. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin ps" 17 | --- 18 | ```bash 19 | spin ps [OPTIONS] 20 | ``` 21 | :: 22 | 23 | ## Other options 24 | You can use any command option from the [docker compose ps](https://docs.docker.com/reference/cli/docker/compose/ps/) command. -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/pull.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'pull | Command Reference - Spin by Server Side Up' 3 | title: 'pull' 4 | description: 'Command reference for "spin pull"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/pull 7 | --- 8 | # spin pull 9 | ::lead-p 10 | Trigger a pull of your Docker Compose images. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin pull" 17 | --- 18 | ```bash 19 | spin pull [OPTIONS] 20 | ``` 21 | :: 22 | ## Official Documentation & Additional Options 23 | This command is a shortcut for [`docker-compose pull`](https://docs.docker.com/engine/reference/commandline/compose_pull/) and can accept additional options that you pass to it. -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/run.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'run | Command Reference - Spin by Server Side Up' 3 | title: 'run' 4 | description: 'Command reference for "spin run"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/run 7 | --- 8 | # spin run 9 | ::lead-p 10 | Use `run` if you want to run a command with NEW containers. This is helpful for package installers, etc. This command does require a Docker Compose file to run. If you're looking for a command that you can run in any directory, check out [`spin latest`](/docs/command-reference/latest/). 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin run" 17 | --- 18 | ```bash 19 | spin run [OPTIONS] SERVICE COMMAND 20 | ``` 21 | :: 22 | 23 | ## Example 24 | ::code-panel 25 | --- 26 | label: Example of running a container for "composer install" with PHP 27 | --- 28 | ```bash 29 | spin run php composer install 30 | ``` 31 | :: 32 | 33 | #### Spin Specific Options 34 | - `--skip-pull`: Do not automatically pull docker images. 35 | - `--force-pull`: Pull Docker Compose images, regardless of cache settings. 36 | 37 | ### Official Docker Options 38 | This command is a shortcut for [`docker-compose run`](https://docs.docker.com/compose/reference/run/) and can accept additional options that you pass to it. 39 | 40 | ## Special notes 41 | * This command specifically ignores running container dependencies 42 | * It will automatically remove the containers once the command is complete 43 | * It adds extra environment variables to improve user-experience if you're running things like "S6 Overlay" inside your containers -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/stop.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Stop | Command Reference - Spin by Server Side Up' 3 | title: 'stop' 4 | description: 'Command reference for "spin stop"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/stop 7 | --- 8 | # spin stop 9 | ::lead-p 10 | Send a `SIGTERM` to **all containers**, then after a grace period, send `SIGKILL`. Read more on the official [docker stop](https://docs.docker.com/engine/reference/commandline/stop/) documentation. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin stop" 17 | --- 18 | ```bash 19 | spin stop 20 | ``` 21 | :: -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/up.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'up | Command Reference - Spin by Server Side Up' 3 | title: 'up' 4 | description: 'Command reference for "spin up"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/up 7 | --- 8 | # spin up 9 | ::lead-p 10 | Bring up all containers defined in `docker-compose.yml` and `docker-compose.$SPIN_ENV.yml` (`$SPIN_ENV` defaults to `dev`). 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin up" 17 | --- 18 | ```bash 19 | spin up [OPTIONS] 20 | ``` 21 | :: 22 | 23 | ## Example 24 | ::note 25 | If you're using a Docker Compose configuration with `build:` directives, you might want to get in the habit of using `spin up --build` to ensure you're always running the latest version of your containers. 26 | :: 27 | ::code-panel 28 | --- 29 | label: Force a build of containers on initialization 30 | --- 31 | ```bash 32 | spin up --build 33 | ``` 34 | :: 35 | 36 | You can add options at the end of the command (like the `--build` shown above. The above command will bring up your containers, but then also force a new build (if you have builds configured in your "docker-compose.dev.yml" file). 37 | 38 | ## Defaults 39 | The `spin up` command defaults to running: 40 | ::code-panel 41 | --- 42 | label: Command default 43 | --- 44 | ```bash 45 | COMPOSE_FILE=docker-compose.yml:docker-compose.dev.yml docker compose up 46 | ``` 47 | :: 48 | 49 | ## Official Documentation & Additional Options 50 | 51 | #### Spin Specific Options 52 | - `--skip-pull`: Do not automatically pull docker images. 53 | - `--force-pull`: Pull Docker Compose images, regardless of cache settings. 54 | 55 | ### Official Docker Options 56 | This command is a shortcut for [`docker compose up`](https://docs.docker.com/compose/reference/up/) and can accept additional options that you pass to it. It also does a number of other special things. 57 | 58 | 59 | ## Special notes 60 | * Make sure to have a `docker-compose.yml` and **by default** a `docker-compose.dev.yml` in your project before running 61 | * Spin will automatically pull image updates (only if the machine is connected to the Internet) 62 | * Spin will remove any orphan containers 63 | 64 | ## Overriding the environment with `$SPIN_ENV` 65 | Let's say you have a few different files in your repository: 66 | ::code-panel 67 | --- 68 | label: Example project root 69 | --- 70 | ``` 71 | . 72 | ├── docker-compose.ci.yml 73 | ├── docker-compose.production.yml 74 | ├── docker-compose.staging.yml 75 | ├── docker-compose.testing.yml 76 | └── docker-compose.yml 77 | ``` 78 | :: 79 | 80 | 81 | By default, Spin uses `docker-compose.yml` and `docker-compose.dev.yml`. 82 | 83 | If you want to change that, you just need to set `$SPIN_ENV`: 84 | ::code-panel 85 | --- 86 | label: Change spin environment 87 | --- 88 | ```bash 89 | SPIN_ENV=testing spin up 90 | ``` 91 | :: 92 | 93 | 94 | This will essentially run: 95 | 96 | ::code-panel 97 | --- 98 | label: Above command will execute this below 99 | --- 100 | ```bash 101 | COMPOSE_FILE=docker-compose.yml:docker-compose.testing.yml docker compose up 102 | ``` 103 | :: -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/update.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'update | Command Reference - Spin by Server Side Up' 3 | title: 'update' 4 | description: 'Command reference for "spin update"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/update 7 | --- 8 | # spin update 9 | ::lead-p 10 | Update `spin` to the latest version (on system/user installs only). 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin update" 17 | --- 18 | ```bash 19 | spin update 20 | ``` 21 | :: 22 | 23 | ## Special notes 24 | This will only run on machines that have `spin` installed to the system. This means if you installed `spin` via "composer" or "yarn", this command will **not** execute. -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/vault.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'vault | Command Reference - Spin by Server Side Up' 3 | title: 'vault' 4 | description: 'Command reference for "spin vault"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/vault 7 | --- 8 | # spin vault 9 | ::lead-p 10 | Encrypt & decrypt files with "Ansible Vault". Accepts any command that [`ansible-vault`](https://docs.ansible.com/ansible/latest/cli/ansible-vault.html) accepts. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin vault" 17 | --- 18 | ```bash 19 | spin vault 20 | ``` 21 | :: 22 | 23 | ## Actions 24 | The `spin vault` command will intelligently pass any arguments to your local `ansible-vault` binary or to Docker if Ansible is not installed locally. It will also accept any commands that are documented with [`ansible-vault`](https://docs.ansible.com/ansible/latest/cli/ansible-vault.html). 25 | 26 | ### Most popular actions 27 | - `edit`: Edit an encrypted file 28 | - `encrypt`: Encrypt an unencrypted file 29 | - `decrypt`: Decrypt an encrypted file 30 | 31 | ## Official Documentation & Additional Options 32 | More actions and syntax reference can be found in the [official documentation](https://docs.ansible.com/ansible/latest/cli/ansible-vault.html). 33 | 34 | ## Examples 35 | ::code-panel 36 | --- 37 | label: Encrypt a file 38 | --- 39 | ```bash 40 | spin vault encrypt myfile.txt 41 | ``` 42 | :: 43 | 44 | ::code-panel 45 | --- 46 | label: Edit an encrypted file 47 | --- 48 | ```bash 49 | spin vault edit myfile.txt 50 | ``` 51 | :: 52 | 53 | ## Special notes 54 | This command will automatically run `ansible vault` via Docker if you do not have Ansible installed on your system. The only major downfall to this approach is when it comes to editing your secret files, you will need to do this all through `vi`, which can be pretty annoying. 55 | 56 | If you'd like a better experience, you may want to consider installing and configuring Ansible on your local machine so you can edit your secrets with your favorite editor. 57 | 58 | ## Editing secrets with Sublime Text 59 | It's possible to edit your secrets with Sublime Text, but it requires a bit of setup. You'll need to [install Ansible to your system](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html). 60 | 61 | Once Ansible is installed and you're able to execute `ansible-vault` locally, you'll then need to set Sublime Text as your editor. 62 | 63 | ::code-panel 64 | --- 65 | label: Set Sublime Text as your editor 66 | --- 67 | ```bash 68 | export EDITOR="subl -w" 69 | ``` 70 | :: 71 | 72 | Add this to your `~/.bashrc` or `~/.zshrc` file to make it permanent. 73 | 74 | ## Saving the file 75 | When you save the file with, Ansible Vault will automatically re-encrypt the file for you. You don't need to do anything else. 76 | 77 | ## Automating Vault Access 78 | If you're constantly being asked to provide a vault password, you can speed up your workflow by securely saving your password to a `.vault-password` file in your project root. 79 | 80 | If that file exists, Ansible will automatically load the password from that file. 81 | 82 | ::note 83 | Never commit `.vault-password` to your repository. It should be added to your `.gitignore` file. 84 | :: -------------------------------------------------------------------------------- /docs/content/docs/9.command-reference/version.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'version | Command Reference - Spin by Server Side Up' 3 | title: 'version' 4 | description: 'Command reference for "spin version"' 5 | layout: docs 6 | canonical: https://serversideup.net/open-source/spin/docs/command-reference/version 7 | --- 8 | # spin version 9 | ::lead-p 10 | Print the version of `spin` that you are running. Similar to `spin debug`, but with less output. 11 | :: 12 | 13 | ## Usage 14 | ::code-panel 15 | --- 16 | label: Usage for "spin version" 17 | --- 18 | ```bash 19 | spin version 20 | ``` 21 | :: -------------------------------------------------------------------------------- /docs/content/hub.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Spin Hub - Docker Templates for Spin' 3 | title: 'Spin Hub' 4 | layout: hub 5 | description: 'Browse Docker templates for Spin created by the Spin team and the community.' 6 | --- 7 | 8 | ::hub-main 9 | :: -------------------------------------------------------------------------------- /docs/content/hub/0.laravel-basic.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Laravel Basic - Spin by Server Side Up' 3 | title: 'Laravel Basic' 4 | description: 'A simple way to get up and running with Laravel + SQLite.' 5 | image: /open-source/spin/images/docs/community-templates/spin-laravel-basic.png 6 | category: 'Laravel' 7 | author: 'Server Side Up' 8 | authorImage: /open-source/spin/images/docs/community-templates/serversideup.png 9 | layout: hubdetail 10 | --- 11 | # Laravel Basic 12 | ::lead-p 13 | The Spin community maintains an official Laravel template that you can use to get up and running with Laravel quickly. This template is designed to get you up and running with the latest stable version of Laravel with the default configurations running SQLite. 14 | :: 15 | 16 | ![Official Laravel Basic Template by Spin](/images/docs/community-templates/spin-laravel-basic.png) 17 | 18 | ## Project Information 19 | Here's information where you can learn more about the project: 20 | 21 | | Property | Value | 22 | |-------------------------|-------------------------| 23 | | Title | Laravel Basic Template | 24 | | Description | A basic installation of Laravel with SQLite. | 25 | | Authors | [Jay Rogers (@jaydrogers)](https://x.com/jaydrogers), [Dan Pastori (@danpastori)](https://x.com/danpastori) | 26 | | License | [GNU GPL v3.0](https://github.com/serversideup/spin-template-laravel-basic/blob/main/LICENSE) | 27 | | Repository URL | https://github.com/serversideup/spin-template-laravel-basic | 28 | | Issues Tracker URL | https://github.com/serversideup/spin-template-laravel-basic/issues | 29 | 30 | ## Creating a new Laravel project 31 | ::code-panel 32 | --- 33 | label: Create a new Laravel project 34 | --- 35 | ```bash 36 | spin new laravel 37 | ``` 38 | :: 39 | 40 | Run the command above to create a new Laravel project with Spin. By default, the new project will be created in the current directory as `./laravel`. You can specify a different project name by replacing `` with your desired name. 41 | 42 | 43 | 44 | ## Adding to an existing Laravel Project 45 | ::code-panel 46 | --- 47 | label: Add to an existing Laravel project 48 | --- 49 | ```bash 50 | spin init laravel 51 | ``` 52 | :: 53 | 54 | ## Further Configuration 55 | There are more steps for you to complete after creating a project or adding Spin to your existing project. All of this information can be found in the project's README file. 56 | 57 | [View the project README →](https://github.com/serversideup/spin-template-laravel-basic) -------------------------------------------------------------------------------- /docs/content/hub/0.laravel-pro.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Laravel Pro - Spin by Server Side Up' 3 | title: 'Laravel Pro' 4 | description: 'An advanced Laravel template with support for Horizon, Reverb, and more.' 5 | image: /open-source/spin/images/docs/community-templates/spin-laravel-pro.png 6 | author: 'Server Side Up' 7 | category: 'Laravel' 8 | authorImage: /open-source/spin/images/docs/community-templates/serversideup.png 9 | layout: hubdetail 10 | --- 11 | 12 | # Laravel Pro 13 | ::lead-p 14 | The Spin team put together a "Spin Pro" template that is available for a one-time purchase for unlimited projects. You'll get access to running Laravel's most advanced features such as Horizon, Reverb, and more. 15 | :: 16 | 17 | ![Official Laravel Pro Template by Spin](/images/docs/community-templates/spin-laravel-pro.png) 18 | 19 | ## Project Information 20 | Here's information where you can learn more about the project: 21 | 22 | | Property | Value 23 | |-------------------------|-------------------------| 24 | | Title | Spin Pro Laravel Template | 25 | | Website | https://getspin.pro | 26 | | Description | An advanced Laravel template with support for Horizon, Reverb, and more. | 27 | | Authors | [Jay Rogers (@jaydrogers)](https://x.com/jaydrogers), [Dan Pastori (@danpastori)](https://x.com/danpastori) | 28 | | License | Commercial License | 29 | | Repository URL | https://github.com/serversideup/spin-template-laravel-pro | 30 | | Issues Tracker URL | https://github.com/serversideup/spin-template-laravel-pro/issues | 31 | 32 | ## Creating a new Laravel project 33 | ::code-panel 34 | --- 35 | label: Create a new Laravel project 36 | --- 37 | ```bash 38 | spin new laravel-pro 39 | ``` 40 | :: 41 | 42 | Run the command above to create a new Laravel project with Spin. By default, the new project will be created in the current directory as `./laravel`. You can specify a different project name by replacing `` with your desired name. 43 | 44 | ## Further Configuration 45 | Spin Pro comes with a full-featured documentation site to help you get started. Visit the Spin Pro website to learn more. 46 | 47 | [View the project Documentation →](https://getspin.pro/docs) -------------------------------------------------------------------------------- /docs/content/hub/0.nuxt.md: -------------------------------------------------------------------------------- 1 | --- 2 | head.title: 'Nuxt Template - Spin by Server Side Up' 3 | title: 'Nuxt (Coming Soon)' 4 | description: 'Learn about the official Nuxt template provided by the Spin community.' 5 | image: /open-source/spin/images/docs/community-templates/spin-nuxt.png 6 | author: 'Server Side Up' 7 | authorImage: /open-source/spin/images/docs/community-templates/serversideup.png 8 | category: 'Nuxt' 9 | layout: hubdetail 10 | --- 11 | # 🚧 Nuxt (coming soon) 12 | ::lead-p 13 | We're working on a template where you'll be able run your own Nuxt application easily. In the meantime, let us know what you'd like to see! 14 | :: 15 | 16 | ![Official Nuxt Template by Spin](/images/docs/community-templates/spin-nuxt.png) 17 | 18 | ## What is Nuxt? 19 | [Nuxt](https://nuxt.com/) is a framework built on top of Vue.js that simplifies the development of modern web applications by offering server-side rendering (SSR), static site generation (SSG), and single-page applications (SPAs). It features automatic routing, code splitting, and a modular architecture, making it easy to build performant and SEO-friendly websites with minimal configuration. 20 | 21 | ## What will be in the Nuxt template? 22 | We're building a Nuxt template that will allow you to run your Nuxt application with any host of your choice. The template will include the following features: 23 | 24 | - **Nuxt**: The latest version of Nuxt.js 25 | - **Zero-downtime deployments**: Deploy your Nuxt application with zero downtime using Spin 26 | - **Centralized management**: Manage your Nuxt application's development, staging, and production environments securely within your repository 27 | 28 | If you'd like to see more features or have more questions, [open a Discussion on GitHub](https://github.com/serversideup/spin/discussions). 29 | 30 | ## When will the Nuxt template be available? 31 | We're working hard to get this template ready for you. Stay tuned for updates on when you can start using the Nuxt template with Spin. -------------------------------------------------------------------------------- /docs/content/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: marketing 3 | --- 4 | 5 | ::marketing-hero 6 | :: 7 | 8 | ::marketing-video 9 | :: 10 | 11 | ::marketing-grid 12 | :: 13 | 14 | ::marketing-ship-faster 15 | :: 16 | 17 | ::marketing-servers 18 | :: 19 | 20 | ::marketing-get-started 21 | :: 22 | 23 | ::marketing-follow-along 24 | :: -------------------------------------------------------------------------------- /docs/layouts/docs.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | -------------------------------------------------------------------------------- /docs/layouts/hub.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /docs/layouts/marketing.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | -------------------------------------------------------------------------------- /docs/middleware/directory.ts: -------------------------------------------------------------------------------- 1 | export default defineNuxtRouteMiddleware(( to, from ) => { 2 | let redirectPath = to.path.endsWith('/') ? to.path.slice(0, -1) : to.path; 3 | 4 | switch( redirectPath ){ 5 | case '/docs/getting-started': 6 | return navigateTo( redirectPath+'/these-images-vs-others', { replace: true } ); 7 | break; 8 | case '/docs/guide': 9 | return navigateTo( redirectPath+'/choosing-the-right-image', { replace: true } ); 10 | break; 11 | case '/docs/reference': 12 | return navigateTo( redirectPath+'/environment-variable-specification', { replace: true } ); 13 | break; 14 | } 15 | }) -------------------------------------------------------------------------------- /docs/nuxt.config.ts: -------------------------------------------------------------------------------- 1 | import tailwindTypography from '@tailwindcss/typography' 2 | 3 | // https://nuxt.com/docs/api/configuration/nuxt-config 4 | export default defineNuxtConfig({ 5 | modules: [ 6 | 'nuxt-og-image', 7 | '@nuxtjs/color-mode', 8 | '@nuxt/content', 9 | '@nuxtjs/plausible', 10 | '@nuxtjs/tailwindcss', 11 | '@vueuse/nuxt' 12 | ], 13 | 14 | content: { 15 | documentDriven: true, 16 | 17 | experimental: { 18 | search: { 19 | indexed: true 20 | } 21 | }, 22 | 23 | markdown: { 24 | tags: { 25 | h2: 'AppHeading2', 26 | h3: 'AppHeading3', 27 | h4: 'AppHeading4' 28 | } 29 | }, 30 | 31 | highlight: { 32 | // OR 33 | theme: { 34 | // Default theme (same as single string) 35 | default: 'github-dark', 36 | // Theme used if `html.dark` 37 | dark: 'github-dark', 38 | // Theme used if `html.sepia` 39 | sepia: 'monokai' 40 | }, 41 | preload: [ 42 | 'dockerfile', 43 | 'ini' 44 | ] 45 | } 46 | }, 47 | 48 | colorMode: { 49 | classSuffix: '' 50 | }, 51 | 52 | nitro: { 53 | prerender: { 54 | routes: [ 55 | '/sitemap.xml', 56 | '/api/search.json' 57 | ] 58 | } 59 | }, 60 | 61 | ogImage: { 62 | componentDirs: ['~/components/Global/OgImage'], 63 | }, 64 | 65 | plausible: { 66 | apiHost: 'https://a.521dimensions.com' 67 | }, 68 | 69 | runtimeConfig: { 70 | public: { 71 | basePath: process.env.NUXT_APP_BASE_URL || '/', 72 | domain: process.env.TOP_LEVEL_DOMAIN 73 | } 74 | }, 75 | 76 | site: { 77 | url: process.env.BASE_PATH, 78 | }, 79 | 80 | tailwindcss: { 81 | config: { 82 | plugins: [tailwindTypography] 83 | }, 84 | cssPath: '~/assets/css/tailwind.css', 85 | } 86 | }) 87 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "build": "nuxt build", 5 | "dev": "nuxt dev", 6 | "generate": "nuxt generate", 7 | "preview": "nuxt preview", 8 | "postinstall": "nuxt prepare" 9 | }, 10 | "devDependencies": { 11 | "@headlessui/vue": "^1.7.8", 12 | "@nuxt/content": "npm:@nuxt/content-edge@latest", 13 | "@nuxtjs/color-mode": "^3.2.0", 14 | "@nuxtjs/plausible": "^0.2.0", 15 | "@nuxtjs/tailwindcss": "^6.11.3", 16 | "@tailwindcss/typography": "^0.5.9", 17 | "@vueuse/core": "^10.7.2", 18 | "@vueuse/nuxt": "^10.7.2", 19 | "nuxt": "^3.10.1", 20 | "nuxt-og-image": "^2.2.4", 21 | "nuxt-site-config": "^1.6.6", 22 | "nuxt-site-config-kit": "^1.6.6", 23 | "sitemap": "^7.1.1", 24 | "surge": "^0.23.1" 25 | }, 26 | "dependencies": { 27 | "@heroicons/vue": "^2.1.1", 28 | "hotkeys-js": "^3.13.7" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/public/images/docs/community-templates/serversideup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/community-templates/serversideup.png -------------------------------------------------------------------------------- /docs/public/images/docs/community-templates/spin-laravel-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/community-templates/spin-laravel-basic.png -------------------------------------------------------------------------------- /docs/public/images/docs/community-templates/spin-laravel-pro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/community-templates/spin-laravel-pro.png -------------------------------------------------------------------------------- /docs/public/images/docs/community-templates/spin-new-community-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/community-templates/spin-new-community-template.png -------------------------------------------------------------------------------- /docs/public/images/docs/community-templates/spin-nuxt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/community-templates/spin-nuxt.png -------------------------------------------------------------------------------- /docs/public/images/docs/digitalocean/api-sidebar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/digitalocean/api-sidebar.png -------------------------------------------------------------------------------- /docs/public/images/docs/digitalocean/generate-token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/digitalocean/generate-token.png -------------------------------------------------------------------------------- /docs/public/images/docs/digitalocean/token-scopes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/digitalocean/token-scopes.png -------------------------------------------------------------------------------- /docs/public/images/docs/getting-started/server-dns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/getting-started/server-dns.png -------------------------------------------------------------------------------- /docs/public/images/docs/github-actions/gha-secrets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/github-actions/gha-secrets.png -------------------------------------------------------------------------------- /docs/public/images/docs/github-actions/github-secrets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/github-actions/github-secrets.png -------------------------------------------------------------------------------- /docs/public/images/docs/github-actions/secrets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/github-actions/secrets.png -------------------------------------------------------------------------------- /docs/public/images/docs/github-actions/zero-downtime-deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/github-actions/zero-downtime-deployment.png -------------------------------------------------------------------------------- /docs/public/images/docs/hetzner/api-token-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/hetzner/api-token-page.png -------------------------------------------------------------------------------- /docs/public/images/docs/hetzner/generate-token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/hetzner/generate-token.png -------------------------------------------------------------------------------- /docs/public/images/docs/hetzner/select-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/hetzner/select-project.png -------------------------------------------------------------------------------- /docs/public/images/docs/vultr/api-link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/vultr/api-link.png -------------------------------------------------------------------------------- /docs/public/images/docs/vultr/api-token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/vultr/api-token.png -------------------------------------------------------------------------------- /docs/public/images/docs/vultr/enable-api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/vultr/enable-api.png -------------------------------------------------------------------------------- /docs/public/images/docs/whats-spin/docker-compose-overrides.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/whats-spin/docker-compose-overrides.png -------------------------------------------------------------------------------- /docs/public/images/docs/whats-spin/docker-overrides-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/whats-spin/docker-overrides-code.png -------------------------------------------------------------------------------- /docs/public/images/docs/whats-spin/spin-deploy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/whats-spin/spin-deploy.png -------------------------------------------------------------------------------- /docs/public/images/docs/whats-spin/spin-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/whats-spin/spin-diagram.png -------------------------------------------------------------------------------- /docs/public/images/docs/whats-spin/spin-maintain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/whats-spin/spin-maintain.png -------------------------------------------------------------------------------- /docs/public/images/docs/whats-spin/spin-provision.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/whats-spin/spin-provision.png -------------------------------------------------------------------------------- /docs/public/images/docs/windows/docker-accept-eula.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/windows/docker-accept-eula.png -------------------------------------------------------------------------------- /docs/public/images/docs/windows/docker-desktop-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/windows/docker-desktop-configuration.png -------------------------------------------------------------------------------- /docs/public/images/docs/windows/docker-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/windows/docker-info.png -------------------------------------------------------------------------------- /docs/public/images/docs/windows/docker-installation-options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/windows/docker-installation-options.png -------------------------------------------------------------------------------- /docs/public/images/docs/windows/docker-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/windows/docker-login.png -------------------------------------------------------------------------------- /docs/public/images/docs/windows/docker-reboot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/windows/docker-reboot.png -------------------------------------------------------------------------------- /docs/public/images/docs/windows/docker-run-hello-world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/windows/docker-run-hello-world.png -------------------------------------------------------------------------------- /docs/public/images/docs/windows/shell-linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/windows/shell-linux.png -------------------------------------------------------------------------------- /docs/public/images/docs/windows/shell-windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/windows/shell-windows.png -------------------------------------------------------------------------------- /docs/public/images/docs/windows/ubuntu-shell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/windows/ubuntu-shell.png -------------------------------------------------------------------------------- /docs/public/images/docs/windows/wsl-configure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/windows/wsl-configure.png -------------------------------------------------------------------------------- /docs/public/images/docs/windows/wsl-install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/docs/windows/wsl-install.png -------------------------------------------------------------------------------- /docs/public/images/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /docs/public/images/favicon/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/favicon/android-chrome-512x512.png -------------------------------------------------------------------------------- /docs/public/images/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/public/images/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/public/images/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /docs/public/images/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /docs/public/images/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/favicon/favicon.ico -------------------------------------------------------------------------------- /docs/public/images/favicon/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/favicon/mstile-150x150.png -------------------------------------------------------------------------------- /docs/public/images/favicon/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by potrace 1.14, written by Peter Selinger 2001-2017 9 | 10 | 12 | 18 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/public/images/favicon/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /docs/public/images/github-actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/github-actions.png -------------------------------------------------------------------------------- /docs/public/images/icons/heart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/public/images/icons/search-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/public/images/logos/amplitude.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AmplitudeJS 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/public/images/social-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serversideup/spin/2d8c7f373ad3c760a6e4ed889f756c5ade55ffc7/docs/public/images/social-image.jpg -------------------------------------------------------------------------------- /docs/server/api/search.json.get.ts: -------------------------------------------------------------------------------- 1 | import { serverQueryContent } from '#content/server' 2 | 3 | export default eventHandler((event) => { 4 | return serverQueryContent(event).where({ _type: 'markdown', navigation: { $ne: false } }).find() 5 | }) -------------------------------------------------------------------------------- /docs/server/routes/sitemap.xml.ts: -------------------------------------------------------------------------------- 1 | import { serverQueryContent } from '#content/server' 2 | import { SitemapStream, streamToPromise } from 'sitemap' 3 | export default defineEventHandler(async (event) => { 4 | // Fetch all documents 5 | const docs = await serverQueryContent(event).find() 6 | const sitemap = new SitemapStream({ 7 | hostname: 'https://serversideup.net' 8 | }) 9 | 10 | for (const doc of docs) { 11 | sitemap.write({ 12 | url: '/open-source/spin'+doc._path, 13 | changefreq: 'monthly' 14 | }) 15 | } 16 | 17 | 18 | sitemap.end() 19 | return streamToPromise(sitemap) 20 | }) -------------------------------------------------------------------------------- /docs/tailwind.config.js: -------------------------------------------------------------------------------- 1 | const defaultTheme = require('tailwindcss/defaultTheme') 2 | 3 | /** @type {import('tailwindcss').Config} */ 4 | module.exports = { 5 | darkMode: "class", 6 | theme: { 7 | fontSize: { 8 | '2xs': ['0.75rem', { lineHeight: '1.25rem' }], 9 | xs: ['0.8125rem', { lineHeight: '1.5rem' }], 10 | sm: ['0.875rem', { lineHeight: '1.5rem' }], 11 | base: ['1rem', { lineHeight: '1.75rem' }], 12 | lg: ['1.125rem', { lineHeight: '1.75rem' }], 13 | xl: ['1.25rem', { lineHeight: '1.75rem' }], 14 | '2xl': ['1.5rem', { lineHeight: '2rem' }], 15 | '3xl': ['1.875rem', { lineHeight: '2.25rem' }], 16 | '4xl': ['2.25rem', { lineHeight: '2.5rem' }], 17 | '5xl': ['3rem', { lineHeight: '1' }], 18 | '6xl': ['3.75rem', { lineHeight: '1' }], 19 | '7xl': ['4.5rem', { lineHeight: '1' }], 20 | '8xl': ['6rem', { lineHeight: '1' }], 21 | '9xl': ['8rem', { lineHeight: '1' }], 22 | }, 23 | typography: require('./typography'), 24 | extend: { 25 | boxShadow: { 26 | glow: '0 0 4px rgb(0 0 0 / 0.1)', 27 | }, 28 | colors: { 29 | link: '#3B82F6' 30 | }, 31 | fontFamily: { 32 | 'inter': ['Inter', 'sans-serif'] 33 | }, 34 | maxWidth: { 35 | lg: '33rem', 36 | '2xl': '40rem', 37 | '3xl': '50rem', 38 | '5xl': '66rem', 39 | }, 40 | opacity: { 41 | 1: '0.01', 42 | 2.5: '0.025', 43 | 7.5: '0.075', 44 | 15: '0.15', 45 | } 46 | } 47 | }, 48 | plugins: [], 49 | content: [ 50 | `/components/**/*.{vue,js,ts}`, 51 | `/layouts/**/*.vue`, 52 | `/pages/**/*.vue`, 53 | `/composables/**/*.{js,ts}`, 54 | `/plugins/**/*.{js,ts}`, 55 | `/App.{js,ts,vue}`, 56 | `/app.{js,ts,vue}`, 57 | `/Error.{js,ts,vue}`, 58 | `/error.{js,ts,vue}` 59 | ], 60 | } -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // https://nuxt.com/docs/guide/concepts/typescript 3 | "extends": "./.nuxt/tsconfig.json" 4 | } 5 | -------------------------------------------------------------------------------- /lib/actions/base64.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_base64() { 3 | if [ "$#" -ne 2 ]; then 4 | echo "Usage: spin base64 encode filename" 5 | echo " spin base64 decode [filename|base64string]" 6 | return 1 7 | fi 8 | 9 | local action=$1 10 | local input=$2 11 | 12 | case "$action" in 13 | encode | -e) 14 | # Check if the file exists for encoding 15 | if [ ! -f "$input" ]; then 16 | echo "Error: File '$input' not found." 17 | return 1 18 | fi 19 | # Encode the file with base64 20 | base64_encode "$input" 21 | ;; 22 | decode | -d) 23 | # Decode the input 24 | if [ -f "$input" ]; then 25 | # If it's a file, decode the file contents 26 | base64_decode - < "$input" 27 | else 28 | # If it's not a file, assume it's a base64 string and try to decode it 29 | echo "$input" | base64_decode - 2>/dev/null 30 | if [ $? -ne 0 ]; then 31 | echo "Error: Input is not a valid base64 string." 32 | return 1 33 | fi 34 | fi 35 | ;; 36 | *) 37 | # Display help menu if invalid action is provided 38 | echo "Invalid action. Valid actions are 'encode' or 'decode'." 39 | echo "Usage: spin base64 encode filename" 40 | echo " spin base64 decode [filename|base64string]" 41 | return 1 42 | ;; 43 | esac 44 | } -------------------------------------------------------------------------------- /lib/actions/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_build() { 3 | # Build the containers with `docker-compose` 4 | $COMPOSE_CMD build "$@" 5 | } -------------------------------------------------------------------------------- /lib/actions/debug.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_debug(){ 3 | 4 | print_version 5 | 6 | # Show operating system version 7 | printf "\n${BOLD}${YELLOW}Operating System Version:${RESET} \n" 8 | case "$(uname -s)" in 9 | Linux*) cat /etc/os-release;; 10 | Darwin*) sw_vers;; 11 | *) echo "This operating system is not supported." && exit 2 12 | esac 13 | printf "\n" 14 | 15 | # Show docker version 16 | printf "${BOLD}${BLUE}Docker Info:${RESET} \n" 17 | printf "$(docker info)\n" 18 | 19 | } -------------------------------------------------------------------------------- /lib/actions/down.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_down() { 3 | local args=($(filter_out_spin_arguments "$@")) 4 | 5 | $COMPOSE_CMD down --remove-orphans "${args[@]}" 6 | } -------------------------------------------------------------------------------- /lib/actions/exec.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_exec(){ 3 | $COMPOSE_CMD exec $@ 4 | } -------------------------------------------------------------------------------- /lib/actions/gh.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_gh() { 3 | # Run GH CLI via Docker 4 | run_gh "$@" 5 | } 6 | -------------------------------------------------------------------------------- /lib/actions/help.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_help(){ 3 | echo -e "${BLUE}${BOLD}================== Spin Help Menu ==================${RESET}" 4 | 5 | echo -e "${GREEN}Available commands:${RESET}" 6 | for file in $SPIN_HOME/lib/actions/*.sh; do 7 | command=$(basename "$file" .sh) 8 | echo -e "${YELLOW}${BOLD}- $command${RESET}" 9 | done 10 | 11 | echo -e "${RED}Run '${BOLD}spin ${RESET}${RED}' to execute a command.${RESET}" 12 | 13 | echo -e "${GREEN}For detailed documentation, visit:${RESET} ${BOLD}https://serversideup.net/open-source/spin/docs${RESET}" 14 | } -------------------------------------------------------------------------------- /lib/actions/kill.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_kill(){ 3 | if [[ $(docker ps --format '{{.Names}}' 2>/dev/null) ]]; then 4 | read -n 1 -r -p "🚨 You're about to kill all running containers. Are you sure you want to do this? (Y) " 5 | echo # Move to a new line 6 | 7 | if [[ ! $REPLY =~ ^[Yy]$ ]]; then 8 | echo "Cancelling... Nothing with Docker was touched 😅" 9 | exit 1 10 | fi 11 | 12 | echo "Killing containers..." 13 | docker kill $(docker ps -q) 14 | else 15 | echo "👉 No containers are running." 16 | fi 17 | } -------------------------------------------------------------------------------- /lib/actions/latest.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_latest(){ 3 | # Check that an argument is passed 4 | if [ $# -gt 0 ]; then 5 | # Check the first argument and pass the user to proper action, Only some actions need arguments passed. 6 | case $1 in 7 | node) 8 | shift 1 9 | docker run --rm -v $(pwd):/usr/app/src/ -w /usr/src/app $SPIN_NODE_IMAGE "$@" 10 | ;; 11 | php) 12 | shift 1 13 | docker run --rm -v $(pwd):/var/www/html $SPIN_PHP_IMAGE "$@" 14 | ;; 15 | *) 16 | echo "\"$1\" is not a valid command. Below are the commands available." 17 | action_help 18 | ;; 19 | esac 20 | else 21 | printf "${BOLD}${YELLOW}\🤔 You didn't pass \"spin new\" any arguments. Run \"spin help\" if you want to see the documentation.${RESET}" 22 | fi 23 | } -------------------------------------------------------------------------------- /lib/actions/logs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_logs(){ 3 | $COMPOSE_CMD logs "$@" 4 | } -------------------------------------------------------------------------------- /lib/actions/maintain.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_maintain(){ 3 | validate_spin_yml 4 | 5 | echo "Preparing Ansible run..." >&2 6 | prepare_ansible_run "$@" 7 | 8 | # Check if there are any remaining unprocessed args 9 | # If so, use the first one as the target environment 10 | if [ ${#SPIN_UNPROCESSED_ARGS[@]} -gt 0 ]; then 11 | SPIN_ANSIBLE_ARGS+=("--extra-vars" "target=${SPIN_UNPROCESSED_ARGS[0]}") 12 | # Remove the first argument since we've processed it 13 | SPIN_UNPROCESSED_ARGS=("${SPIN_UNPROCESSED_ARGS[@]:1}") 14 | fi 15 | 16 | run_ansible --allow-ssh --mount-path "$(pwd):/ansible" \ 17 | ansible-playbook serversideup.spin.maintain \ 18 | --inventory "$SPIN_INVENTORY_FILE" \ 19 | --extra-vars @./.spin.yml \ 20 | "${SPIN_ANSIBLE_ARGS[@]}" \ 21 | "${SPIN_UNPROCESSED_ARGS[@]}" 22 | } -------------------------------------------------------------------------------- /lib/actions/mkpasswd.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_mkpasswd(){ 3 | docker run --rm -it serversideup/mkpasswd "$@" 4 | } -------------------------------------------------------------------------------- /lib/actions/new.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_new() { 3 | if [ $# -lt 1 ]; then 4 | echo "${BOLD}${YELLOW}🤔 You didn't pass \"spin new\" any arguments. Run \"spin help\" if you want to see the documentation.${RESET}" 5 | exit 1 6 | fi 7 | 8 | # When we call the `install.sh` script on a template, 9 | # set the SPIN_ACTION to "new" 10 | SPIN_ACTION="new" 11 | export SPIN_ACTION 12 | 13 | action_init "$@" 14 | } 15 | -------------------------------------------------------------------------------- /lib/actions/provision.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_provision(){ 3 | validate_spin_yml 4 | 5 | echo "Preparing Ansible run..." >&2 6 | prepare_ansible_run "$@" 7 | 8 | # Check if there are any remaining unprocessed args 9 | # If so, use the first one as the target environment 10 | if [ ${#SPIN_UNPROCESSED_ARGS[@]} -gt 0 ]; then 11 | SPIN_ANSIBLE_ARGS+=("--extra-vars" "target=${SPIN_UNPROCESSED_ARGS[0]}") 12 | # Remove the first argument since we've processed it 13 | SPIN_UNPROCESSED_ARGS=("${SPIN_UNPROCESSED_ARGS[@]:1}") 14 | fi 15 | 16 | run_ansible --set-env --allow-ssh --mount-path "$(pwd):/ansible" \ 17 | ansible-playbook serversideup.spin.provision \ 18 | --inventory "$SPIN_INVENTORY_FILE" \ 19 | --extra-vars @./.spin.yml \ 20 | "${SPIN_ANSIBLE_ARGS[@]}" \ 21 | "${SPIN_UNPROCESSED_ARGS[@]}" 22 | } -------------------------------------------------------------------------------- /lib/actions/prune.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_prune(){ 3 | # Check for force flag 4 | if [[ ! "$*" =~ "-f"|"--force" ]]; then 5 | echo "${BOLD}${YELLOW}🚨 You're about to delete some data.${RESET}" 6 | fi 7 | 8 | docker system prune --all $@ 9 | echo "${BOLD}${GREEN}✅ Docker cache cleared.${RESET}" 10 | 11 | # Validate SPIN_CACHE_DIR variable is set 12 | if [ -z "$SPIN_CACHE_DIR" ]; then 13 | echo "Error: SPIN_CACHE_DIR is not set" 14 | exit 1 15 | fi 16 | 17 | # Remove spin cache 18 | if compgen -G "$SPIN_CACHE_DIR/.spin*" > /dev/null; then 19 | rm -rf "$SPIN_CACHE_DIR"/.spin* 20 | echo "${BOLD}${GREEN}✅ Spin update cache cleared.${RESET}" 21 | fi 22 | 23 | # Remove ansible collections cache 24 | if [ -d "$SPIN_CACHE_DIR/collections/" ]; then 25 | rm -rf $SPIN_CACHE_DIR/collections/ 26 | echo "${BOLD}${GREEN}✅ Spin Ansible Collections cache cleared.${RESET}" 27 | fi 28 | 29 | # Remove docker registry cache 30 | if [ -d "$SPIN_CACHE_DIR/registry/" ]; then 31 | rm -rf $SPIN_CACHE_DIR/registry/ 32 | echo "${BOLD}${GREEN}✅ Spin Docker Registry cache cleared.${RESET}" 33 | fi 34 | } -------------------------------------------------------------------------------- /lib/actions/ps.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_ps(){ 3 | $COMPOSE_CMD ps $@ 4 | } -------------------------------------------------------------------------------- /lib/actions/pull.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_pull() { 3 | $COMPOSE_CMD pull 4 | update_last_pull_timestamp 5 | } -------------------------------------------------------------------------------- /lib/actions/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_run(){ 3 | docker_pull_check "$@" 4 | 5 | local args=($(filter_out_spin_arguments "$@")) 6 | 7 | # Run Docker Compose without dependencies. Ensure automations and S6 logging are disabled 8 | $COMPOSE_CMD run -e "S6_VERBOSITY=0" -e "SHOW_WELCOME_MESSAGE=false" --remove-orphans --no-deps --rm \ 9 | "${args[@]}" 10 | } -------------------------------------------------------------------------------- /lib/actions/stop.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_stop(){ 3 | if [[ $(docker ps --format '{{.Names}}' 2>/dev/null) ]]; then 4 | read -n 1 -r -p "🚨 You're about to stop all running containers. Are you sure you want to do this? (Y) " 5 | echo # Move to a new line 6 | 7 | if [[ ! $REPLY =~ ^[Yy]$ ]]; then 8 | echo "Cancelling... Nothing with Docker was touched 😅" 9 | exit 1 10 | fi 11 | 12 | echo "Stopping containers..." 13 | docker stop $(docker ps -q) 14 | else 15 | echo "👉 No containers are running." 16 | fi 17 | } -------------------------------------------------------------------------------- /lib/actions/up.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_up() { 3 | docker_pull_check "$@" 4 | 5 | local args=($(filter_out_spin_arguments "$@")) 6 | 7 | $COMPOSE_CMD up --remove-orphans ${args[@]} 8 | } -------------------------------------------------------------------------------- /lib/actions/update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_update() { 3 | 4 | if [ "$(installation_type)" == "user" ] && is_internet_connected; then 5 | check_for_upgrade --force 6 | else 7 | printf "${BOLD}${YELLOW}⚠️ Cannot automatically perform an update.${RESET} " 8 | printf "You're using \"spin\" from the project level or you're using spin in development mode.\n" 9 | printf "Use NPM/yarn or composer to update spin.\n" 10 | exit 1 11 | fi 12 | } -------------------------------------------------------------------------------- /lib/actions/vault.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_vault(){ 3 | local vault_args=() 4 | local vault_run_command=() 5 | show_help() { 6 | "${vault_run_command[@]}" --help | sed 's/ansible-vault/spin vault/g' 7 | } 8 | 9 | # Check if ansible-vault is installed locally 10 | if [[ $(command -v ansible-vault) ]]; then 11 | vault_run_command=("ansible-vault") 12 | run_type="local" 13 | else 14 | vault_run_command=("run_ansible" "--mount-path" "$(pwd):/ansible" "ansible-vault") 15 | run_type="docker" 16 | fi 17 | 18 | # Read the vault arguments into an array 19 | read -r -a vault_args < <(set_ansible_vault_args "$run_type") 20 | 21 | # Check if any argument is '--help' 22 | for arg in "$@"; do 23 | if [[ "$arg" == "--help" ]]; then 24 | show_help 25 | exit 0 26 | fi 27 | done 28 | 29 | # Sanity check 30 | if [[ -z $2 ]]; then 31 | echo "${BOLD}${RED}❌ Invalid command.${RESET}" 32 | show_help 33 | exit 1 34 | fi 35 | 36 | # Show notification for users running with Docker 37 | if [[ $run_type == "docker" && $1 == "edit" ]]; then 38 | echo "${BOLD}${YELLOW}ℹ️ You don't have ansible-vault installed locally." 39 | echo "${BOLD}${YELLOW}ℹ️ We'll use the container to edit your file, which uses \"vi\".${RESET}" 40 | echo "${BOLD}${YELLOW}👉 To edit the file, press i.${RESET}" 41 | echo "${BOLD}${YELLOW}💾 To save your changes and exit, press ESC, then type \":wq\" and press ENTER.${RESET}" 42 | fi 43 | 44 | "${vault_run_command[@]}" "$@" "${vault_args[@]}" 45 | } 46 | -------------------------------------------------------------------------------- /lib/actions/version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | action_version() { 3 | print_version 4 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@serversideup/spin", 3 | "version": "main", 4 | "description": "Replicate your production environment locally using Docker. Just run \\\"spin up\\\". It's really that easy.", 5 | "repository": { 6 | "type": "git", 7 | "url": "git+https://github.com/serversideup/spin.git" 8 | }, 9 | "author": "Server Side Up", 10 | "license": "GPL-3.0", 11 | "bugs": { 12 | "url": "https://github.com/serversideup/spin/issues" 13 | }, 14 | "homepage": "https://github.com/serversideup/spin#readme", 15 | "bin": { 16 | "spin": "./bin/spin" 17 | } 18 | } 19 | --------------------------------------------------------------------------------