{"id":15699132,"url":"https://github.com/nurodev/swarmy","last_synced_at":"2025-05-09T02:23:42.560Z","repository":{"id":232293484,"uuid":"783308115","full_name":"NuroDev/swarmy","owner":"NuroDev","description":"🐳  A prototype full-stack project with automated Docker Swarm deployments","archived":false,"fork":false,"pushed_at":"2024-04-25T20:47:55.000Z","size":472,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-02T02:53:10.836Z","etag":null,"topics":["astro","astrojs","bun","containers","docker","docker-swarm","dockerswarm","monorepo","ts","typescript"],"latest_commit_sha":null,"homepage":"","language":"Astro","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NuroDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-07T14:32:06.000Z","updated_at":"2024-07-20T22:30:08.842Z","dependencies_parsed_at":"2024-04-09T00:44:29.566Z","dependency_job_id":"7e8b5073-430b-42cc-8d46-0886c228dcf2","html_url":"https://github.com/NuroDev/swarmy","commit_stats":null,"previous_names":["nurodev/swarmy"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NuroDev%2Fswarmy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NuroDev%2Fswarmy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NuroDev%2Fswarmy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NuroDev%2Fswarmy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NuroDev","download_url":"https://codeload.github.com/NuroDev/swarmy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176752,"owners_count":21866202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astro","astrojs","bun","containers","docker","docker-swarm","dockerswarm","monorepo","ts","typescript"],"created_at":"2024-10-03T19:38:34.959Z","updated_at":"2025-05-09T02:23:42.507Z","avatar_url":"https://github.com/NuroDev.png","language":"Astro","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐳 Swarmy\n\nA prototype full-stack project with automated Docker Swarm deployments\n\n## 🔧 Setup\n\nSince this project is extremely basic there is only a few steps needed in order to get things setup.\n\n### 👨‍💻 Local\n\nFor local development, the only requirement is for the `web` service which requires a custom `API_URL` environment variable.\n\nTo set this up, copy the `.env.example` file to `.env` inside `services/web/`. The default value should work out of the box.\n\n### 🚀 Deployment\n\nTo set up the deployment workflow for this project, there is a few steps that need to be taken.\n\n#### ☁️ Configure server\n\nThis project is primarily designed for a single-host Docker Swarm setup. As such, the server needs the following to be set up:\n\n- Install Docker: Most cloud providers offer this as a one-click setup. Otherwise follow the [official guide](https://docs.docker.com/engine/install/).\n- Enable Docker Swarm: Run `docker swarm init` to enable Docker Swarm on the server.\n- Login to the GitHub Container Registry. See the documentation [here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic).\n- Create the `public` overlay Docker network by running: `docker network create --driver overlay public`\n\n#### 🔌 DNS\n\nThe production configuration of this project uses [Traefik](https://traefik.io/) as a reverse proxy \u0026 with a single `DOMAIN` environment variable to route traffic.\n\nWith this you will, of course, need to add your servers IP address to your DNS records.\n\nFor example: If your `DOMAIN` is `example.com`, you will need to add 2 `A` records to your DNS settings:\n\n- `example.com` pointing to your server's IP address\n- `api.example.com` pointing to your server's IP address\n\n### 🔒 Secrets\n\nSince one of the key parts of this project is the automated deployment workflow, there are a few secrets that need to be added to the repository.\n\nThese are as follows:\n\n- `SSH_HOSTNAME` - The IP address or hostname of the server you wish to deploy to.\n- `SSH_USERNAME` - The username of the user you wish to deploy as.\n- `SSH_PRIVATE_KEY` - The SSH private key that has access to the server you wish to deploy to.\n  - It is recommended to make a new SSH key pair specifically for this project.\n  - Generate a new key pair with `ssh-keygen -t rsa -b 4096` \u0026 then add it to both the server \u0026 secret here.\n- `DOMAIN` - The domain that you wish to deploy to.\n- `CLOUDFLARE_EMAIL` - The email address of the Cloudflare account.\n- `CLOUDFLARE_DNS_API_TOKEN` - The API key of the Cloudflare account.\n  - This is used to automatically generate SSL certificates for the domain.\n\n## 🥟 Bun\n\nFor all you [Bun](https://bun.sh/) lovers out there, check out the `bun` branch to see a tweaked version of this project built entirely around Bun.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnurodev%2Fswarmy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnurodev%2Fswarmy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnurodev%2Fswarmy/lists"}