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
New users can deploy a server on their own very easily
馃弳 How to solve this problem
Solution Overview
We can reduce the knowledge requirements by allowing users to run spin provision (to configure and prepare their server for Docker), then spin deploy to locally deploy their image to their servers.
This proposed method eliminates a few headaches:
Users don't need to learn GitHub Actions or the deep inner workings on how a Docker Registry works
This configuration is a lot easier to debug since its working with systems directly in the user's control
[!NOTE]
This method is intended to be used for very simple set ups. For most environments, it will be recommended to use GitHub Actions or GitLab CI (or comparable) to deploy applications
Deployment Process
Initialize Project (create files)
Configure (ensure Spin configs are set)
Build (ensure tag is set correctly, ensure env exists within application)
Hey Jay as I played this feature a bit already I was wondering what it would look like when running multiple applications on the same server. As you won't deploy generic services like traefik and redis with each application/project, would you have like a generic stack/project with stuff like traefik, redis etc, and then specific app stacks with php service(s) + appropriate traefik labels? Or would this be meant to deploy 1 app per server?
Been doing some testing, and got it working with multiple swarm stacks. 1 stack for traefik, 1 for redis, and 1 with a laravel project. What's cool about the setup is that it's really easy to run multiple web projects on the same server. Perhaps I'm misunderstanding the current situation and this is already possible, but I couldn't see how.
A couple things I ran into:
A Dockerfile is needed when running spin deploy, while it won't be needed if your stack only consists of a treafik or redis service. So I created an empty Dockerfile that just uses a random image.
As I intended to only run traefik and redis on production and not locally I removed docker-compose.dev.yml. But the deploy command is throwing a warning that docker-compose.dev.yml is missing.
Also a docker-compose-prod.yml is needed, would be nice to just default to docker-compose.yml if there is not production yml.
You need to update the production server name in spin-inventory.ini to be unique across all stacks, because that name is being used to generate the stack name. Maybe it could be supported to be able to somewhere set the stack name, so you can always use spin deploy production instead if spin deploy production_<unique_tag>
Its also important to define the network as follows:
networks:
web-public:
external: true
Else the stacks won't be able to communicate with each other.
All things above are probably out of scope currently for this issue/feature, but it would be really cool to have proper support for multiple docker stacks.
Discussed in #61
Originally posted by jaydrogers January 24, 2024
馃憠 Describe the problem
馃懃 Problem evidence & reach
Some users have expressed interest in removing this requirement: https://discord.com/channels/910287105714954251/1195096786776359064
馃グ Describe the "impact" on users?
馃弳 How to solve this problem
Solution Overview
We can reduce the knowledge requirements by allowing users to run
spin provision
(to configure and prepare their server for Docker), thenspin deploy
to locally deploy their image to their servers.This proposed method eliminates a few headaches:
Deployment Process
docker image save
: https://nickjanetakis.com/blog/docker-tip-97-save-and-load-docker-images-from-a-zip-file)docker stack deploy
to initialize the transfer馃挴 How do we validate the problem is solved?
spin provision
(to configure their server) thenspin deploy
to deploy their stackThe text was updated successfully, but these errors were encountered: