You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I have been trying to set up Spin for my side project, I had (a lot 😅) of questions that I think other people may run into also.
So I have tried to document my issues with a solution to it.
Docker file / docker-compose files
What needs to be included
If using volumes on docker-compose.prod.yml the data will be under /var/lib/docker/volumes
Can you copy docker-compose.dev.yml to docker-compose.prod.yml and what needs to be changed
Spin.yml & spin-inventory.ini files
spin-inventory.ini How should the domain or ip be added, maybe change the default comment out example to make it more real.
Add YOUR SERVER IP DOMAIN.com to your hosts file (etc/hosts) on Mac like this
1234.1234.1234.1234 mydomain.com
How to connect to your mysql database
In tableplus you need to select “over SSH / Use SSH” server is your server IP port is 2222 as you can see in docker-compose.prod.yml file under SSH section
User is tunnel and then you will use your private SSH key where it says “use SSH key”
In Docker-compose.prod.yml file make sure that you have added your PUBLIC SSH KEY into the AUTHORIZED_KEYS and ALLOWED_IPS is
Your IP address or ALLOWED_IPS: "AllowUsers tunnel"
How to add npm install or other actions in GitHub actions
Go into your service_docker-build-and-publish.yml file and add this.
sudo docker volume rm $(sudo docker volume ls -q) // Remove all Docker volumes:
sudo docker network prune -f // Remove all Docker networks
sudo docker system prune -a --volumes -f // Finally, to remove any remaining unused objects (such as build cache):
docker ps
docker service ls
docker service logs
commend issues
404 not found could be a traffic issue
Www.domain is not working remember dns settings
Missing https when using VITE add this in your .environment file (ASSET_URL="${APP_URL}”)
Github actions fails could be an invalid variable or that your username on Github has any uppercase letters (Github actions don’t support that)
Failed to parse spin-inventory or spin.yml file (make sure there is no syntax issues)
Can’t do spin provision after doing it once. Remember to add user you just created https://serversideup.net/open-source/spin/docs/command-reference/provision
Mixed Content Error" with Inertia.js and Vue in Laravel app when doing ajax calls The PHP Framework For Web Artisans (remember to addTrusted Proxies)
What is Traffic
Traefik is a popular open-source reverse proxy and load balancer designed to simplify the deployment of microservices. It's known for its automatic service discovery and configuration capabilities, making it particularly well-suited for dynamic environments orchestrated with Kubernetes, Docker, and other container technologies.
Key features of Traefik include:
Automatic Service Discovery: Traefik can automatically detect changes in your infrastructure, such as when microservices are added or removed, and adjust its routing configurations accordingly.
Dynamic Configuration: Unlike traditional reverse proxies that require manual configuration updates and reloads, Traefik updates its configuration in real-time without service interruption.
Load Balancing: Traefik supports various load balancing algorithms to distribute traffic among your services optimally.
SSL/TLS Integration: Traefik can automatically handle SSL/TLS certificates using Let's Encrypt for secure HTTPS connections, including automatic renewal of certificates.
Observability: It provides monitoring and metrics through integration with popular observability tools, allowing you to monitor the health and performance of your services.
Middleware: Traefik supports a variety of middleware for adding functionality to your requests before they reach your services, such as rate limiting, authentication, and request transformation.
High Availability: Traefik can be deployed in a high availability configuration to ensure that your services remain accessible in the event of a node failure.
⠀Traefik is commonly used in microservices architectures to manage the routing of requests to the appropriate backend services, handling tasks like SSL termination, load balancing, and authentication transparently. It's particularly favored in environments where service instances may be frequently added or removed, and their locations change dynamically, due to its ability to adapt its configuration automatically.
What is GitHub actions
GitHub Actions is a CI/CD (Continuous Integration and Continuous Deployment) platform that allows you to automate your build, test, and deployment pipeline directly within your GitHub repository. Launched by GitHub, it provides a powerful, flexible way to automate virtually any software workflow, with native integration into GitHub's ecosystem.
Key features of GitHub Actions include:
Workflows and Actions: Workflows are custom automated processes that you can set up in your repository to build, test, package, release, and deploy your code. Workflows are defined by a YAML file in the .github/workflows directory of a repository. An action is the smallest portable building block of a workflow, which can be combined with other actions to create a job.
Events: Workflows can be triggered by a wide range of events within your GitHub repository, such as a push, pull request, issue creation, or even a schedule (using CRON syntax).
Runners: GitHub provides hosted runners for running your workflows, or you can self-host your runners for more control over the environment. Runners can be on Linux, Windows, and macOS.
Matrix Builds: You can test across multiple operating systems, versions, and platforms using matrix builds, which allow you to specify different variations to run each job in your workflow.
Containers and Services: Workflows can run jobs in containers, allowing you to use specific tooling or versions not available on the runner by default. You can also spin up service containers for databases, caches, and other services that your tests might need.
Artifacts and Caching: You can share data between jobs in a workflow and save data (like build artifacts or dependencies) to speed up future runs.
Marketplace: GitHub Actions integrates with the GitHub Marketplace, where you can find and share actions to perform common tasks, making it easier to get started and build complex workflows.
Secrets and Environment Variables: Securely store and use secrets, like API keys and access tokens, and define environment variables at the repository, organization, or environment level.
⠀GitHub Actions makes it easy for developers to automate their software workflows, from simple CI tasks to complex CD pipelines, directly within their GitHub repositories. It's particularly powerful for GitHub-centric projects due to its deep integration with the platform's features and services.
📝 DocumentationItems that relate to documentation improvements.
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As I have been trying to set up Spin for my side project, I had (a lot 😅) of questions that I think other people may run into also.
So I have tried to document my issues with a solution to it.
Docker file / docker-compose files
What needs to be included
If using volumes on docker-compose.prod.yml the data will be under
/var/lib/docker/volumes
Can you copy docker-compose.dev.yml to docker-compose.prod.yml and what needs to be changed
Spin.yml & spin-inventory.ini files
spin-inventory.ini How should the domain or ip be added, maybe change the default comment out example to make it more real.
How to change PHP version
How to setup queues
Use Horizon
Laravel Horizon with Docker - Docker PHP - Server Side Up
Start it up by doing
spin run horizon php artisan horizon
in your project folder in the terminal.Test Spin on a IP address instead of domain
YOUR SERVER IP DOMAIN.com
to your hosts file (etc/hosts) on Mac like thisHow to connect to your mysql database
In tableplus you need to select “over SSH / Use SSH” server is your server IP port is 2222 as you can see in docker-compose.prod.yml file under SSH section
User is tunnel and then you will use your private SSH key where it says “use SSH key”
In Docker-compose.prod.yml file make sure that you have added your PUBLIC SSH KEY into the AUTHORIZED_KEYS and ALLOWED_IPS is
Your IP address or
ALLOWED_IPS: "AllowUsers tunnel"
How to add npm install or other actions in GitHub actions
Go into your
service_docker-build-and-publish.yml
file and add this.Generate a deploy ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/Desktop/deploy -C deploy-key
Good commands
commend issues
404 not found could be a traffic issue
Www.domain is not working remember dns settings
Missing https when using VITE add this in your .environment file (ASSET_URL="${APP_URL}”)
Github actions fails could be an invalid variable or that your username on Github has any uppercase letters (Github actions don’t support that)
Failed to parse spin-inventory or spin.yml file (make sure there is no syntax issues)
Can’t do spin provision after doing it once. Remember to add user you just created https://serversideup.net/open-source/spin/docs/command-reference/provision
Mixed Content Error" with Inertia.js and Vue in Laravel app when doing ajax calls The PHP Framework For Web Artisans (remember to addTrusted Proxies)
What is Traffic
Traefik is a popular open-source reverse proxy and load balancer designed to simplify the deployment of microservices. It's known for its automatic service discovery and configuration capabilities, making it particularly well-suited for dynamic environments orchestrated with Kubernetes, Docker, and other container technologies.
Key features of Traefik include:
⠀Traefik is commonly used in microservices architectures to manage the routing of requests to the appropriate backend services, handling tasks like SSL termination, load balancing, and authentication transparently. It's particularly favored in environments where service instances may be frequently added or removed, and their locations change dynamically, due to its ability to adapt its configuration automatically.
What is GitHub actions
GitHub Actions is a CI/CD (Continuous Integration and Continuous Deployment) platform that allows you to automate your build, test, and deployment pipeline directly within your GitHub repository. Launched by GitHub, it provides a powerful, flexible way to automate virtually any software workflow, with native integration into GitHub's ecosystem.
Key features of GitHub Actions include:
⠀GitHub Actions makes it easy for developers to automate their software workflows, from simple CI tasks to complex CD pipelines, directly within their GitHub repositories. It's particularly powerful for GitHub-centric projects due to its deep integration with the platform's features and services.
Documentation as PDF.pdf
Beta Was this translation helpful? Give feedback.
All reactions