{"id":18849572,"url":"https://github.com/gaurav-gosain/uadmin-railway","last_synced_at":"2025-04-14T08:52:36.075Z","repository":{"id":59065085,"uuid":"535222115","full_name":"Gaurav-Gosain/uadmin-railway","owner":"Gaurav-Gosain","description":"Deploy your uAdmin project and host it with a single click (and a few more steps 👀) !","archived":false,"fork":false,"pushed_at":"2023-05-15T17:59:15.000Z","size":15052,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T22:23:09.411Z","etag":null,"topics":["api","cd","ci","deploy","docker","go","golang","mysql","railway","rest","uadmin"],"latest_commit_sha":null,"homepage":"https://gaurav-gosain.github.io/uadmin-railway/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gaurav-Gosain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-09-11T07:25:58.000Z","updated_at":"2025-01-13T15:13:55.000Z","dependencies_parsed_at":"2024-11-08T03:34:17.012Z","dependency_job_id":null,"html_url":"https://github.com/Gaurav-Gosain/uadmin-railway","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaurav-Gosain%2Fuadmin-railway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaurav-Gosain%2Fuadmin-railway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaurav-Gosain%2Fuadmin-railway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaurav-Gosain%2Fuadmin-railway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gaurav-Gosain","download_url":"https://codeload.github.com/Gaurav-Gosain/uadmin-railway/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852078,"owners_count":21171838,"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":["api","cd","ci","deploy","docker","go","golang","mysql","railway","rest","uadmin"],"created_at":"2024-11-08T03:20:57.255Z","updated_at":"2025-04-14T08:52:36.052Z","avatar_url":"https://github.com/Gaurav-Gosain.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golang and [uAdmin](https://github.com/uadmin/uadmin) CI/CD using [🚅Railway](https://railway.app/)!\n\n[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/9IP5nJ?referralCode=A7siyP)\n\n## Steps to Deploy\n- Make sure to create a Github account and link it with [🚅Railway](https://railway.app/)\n- Click [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/9IP5nJ?referralCode=A7siyP)\n\n![](assets/deploy_screen_1.png)   \n\n- Give your new Repository a name (and select the visibility if you want to make it private)\n- Set the Environment Variables to the following (you can change the port as per your needs):\n\n|                               Value                               | env variable   |\n| :---------------------------------------------------------------: | -------------- |\n| `1`                                                               |`CGO_ENABLED`   |\n| `8080`                                                            |`PORT`          |\n| `gcc`                                                             |`NIXPACKS_PKGS` |\n| `encryption key used for encrypting and decrypting the  database` |`KEY`           |\n| `salt used for encrypting and decrypting the database`            |`SALT`          |\n\n\u003e NOTE: The `PORT` value here needs to match the port where uAdmin is exposed to (the default value is `8080` and I recommend not changing it unless necessary)\n\n- and finally click on `Deploy`\n\n## TA-DA! 🎉 Your app is deployed!\n\n- A github repository will be created with the name you gave in the previous step\n- A uadmin instance is run\n- It is hosted on a live URL (which you can find in the `Deployments` tab of your project)\n- The expected port is exposed \n- An SSL certificate is generated\n- A MySQL database is automatically created and linked to uAdmin\n- The database is encrypted using the `KEY` and `SALT` environment variables\n  \n### All that with a click of a button and a few environment variables!\n\n![](assets/deploy_screen_2.png) \n![](assets/deploy_screen_3.png)   \n\nFinally, to setup this repository locally, you can follow the steps below:\n\n- Head over to github and clone the repository that was created for you.\n- Clicking on MySQL on the railway dashboard will give you the following details:\n  ![](assets/mysql.png)  \n  - The values for the fields like `host`, `port`, `user`, `password` and `name` can be found in the above screenshot from the fields `MYSQLHOST`, `MYSQLPORT`, `MYSQLUSER`, `MYSQLPASSWORD` and `MYSQLDATABSE` respectively.\n  \n\u003e **host** ⇄ **MYSQLHOST**\n\n\u003e **port** ⇄ **MYSQLPORT**\n\n\u003e **user** ⇄ **MYSQLUSER**\n\n\u003e **password** ⇄ **MYSQLPASSWORD**\n\n\u003e **name** ⇄ **MYSQLDATABSE** \n\n- Create a `.database` file in the root of the repository and add the following content to it using the values mapped from the previous step:\n  \n```json\n{\n  \"type\": \"mysql\",\n  \"name\": \"railway\",\n  \"user\": \"root\",\n  \"password\": \"********************\",\n  \"host\": \"*********************.railway.app\",\n  \"port\": 1234\n}\n```\n- Create a `.encrypt` file in the root of the repository and add the following content to it using `KEY` and `SALT` environment variables from the railway dashboard:\n  \n```json\n{\n  \"KEY\": \"*********************\",\n  \"SALT\": \"*********************\"\n}\n```\n\n\u003e You can test the connection to the MySQL instance by running the following command in the root of the repository locally (assuming you have go installed on your machine):\n  \u003e ```shell\n  \u003e go mod download; go build .; ./railway\n  \u003e ```\n\nCommit these changes to the repository and push them to github.\n\n### Now for the cool part!\nSince railway automatically deploys the app whenever there is a change in the repository, you will see that a new build is triggered and the app is deployed with the changes you made as soon as you push them to github!\n\n\nTo fix:\n\n```jsx\n[  ERROR ]   Hanlder.NewLogger. Unix syslog delivery error\n```\n\n\u003e Update on the above error: The issue is solved in HEAD and will be releases in a new version with the update. (~Internal Sources 👀)\n\n## About me\n\n[![GH WidgetBox](https://gh-widgetbox.vercel.app/api/profile?username=Gaurav-Gosain\u0026data=followers,repositories,stars,commits)](https://github.com/Gaurav-Gosain)\n\n\u003c!-- ## Website Page Speed --\u003e\n\n\u003c!-- ![Metrics](https://metrics.lecoq.io/gaurav-gosain?template=classic\u0026base.header=0\u0026base.activity=0\u0026base.community=0\u0026base.repositories=0\u0026base.metadata=0\u0026pagespeed=1\u0026base=header%2C%20activity%2C%20community%2C%20repositories%2C%20metadata\u0026base.indepth=false\u0026base.hireable=false\u0026base.skip=false\u0026pagespeed=false\u0026pagespeed.url=https%3A%2F%2Fgaurav-gosain.github.io%2Fuadmin-railway%2F\u0026pagespeed.detailed=true\u0026pagespeed.screenshot=true\u0026pagespeed.pwa=true\u0026config.timezone=Asia%2FDubai) --\u003e\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=Gaurav-Gosain/uadmin-railway\u0026type=Date)](https://star-history.com/#Gaurav-Gosain/uadmin-railway\u0026Date)\n\n\u003cdiv style=\"display:flex;flex-wrap:wrap;\"\u003e\n  \u003cimg alt=\"GitHub Language Count\" src=\"https://img.shields.io/github/languages/count/Gaurav-Gosain/uadmin-railway\" style=\"padding:5px;margin:5px;\" /\u003e\n  \u003cimg alt=\"GitHub Top Language\" src=\"https://img.shields.io/github/languages/top/Gaurav-Gosain/uadmin-railway\" style=\"padding:5px;margin:5px;\" /\u003e\n  \u003cimg alt=\"\" src=\"https://img.shields.io/github/repo-size/Gaurav-Gosain/uadmin-railway\" style=\"padding:5px;margin:5px;\" /\u003e\n  \u003cimg alt=\"GitHub Issues\" src=\"https://img.shields.io/github/issues/Gaurav-Gosain/uadmin-railway\" style=\"padding:5px;margin:5px;\" /\u003e\n  \u003cimg alt=\"GitHub Closed Issues\" src=\"https://img.shields.io/github/issues-closed/Gaurav-Gosain/uadmin-railway\" style=\"padding:5px;margin:5px;\" /\u003e\n  \u003cimg alt=\"GitHub Pull Requests\" src=\"https://img.shields.io/github/issues-pr/Gaurav-Gosain/uadmin-railway\" style=\"padding:5px;margin:5px;\" /\u003e\n  \u003cimg alt=\"GitHub Closed Pull Requests\" src=\"https://img.shields.io/github/issues-pr-closed/Gaurav-Gosain/uadmin-railway\" style=\"padding:5px;margin:5px;\" /\u003e\n  \u003cimg alt=\"GitHub Contributors\" src=\"https://img.shields.io/github/contributors/Gaurav-Gosain/uadmin-railway\" style=\"padding:5px;margin:5px;\" /\u003e\n  \u003cimg alt=\"GitHub Last Commit\" src=\"https://img.shields.io/github/last-commit/Gaurav-Gosain/uadmin-railway\" style=\"padding:5px;margin:5px;\" /\u003e\n  \u003cimg alt=\"GitHub Commit Activity (Week)\" src=\"https://img.shields.io/github/commit-activity/w/Gaurav-Gosain/uadmin-railway\" style=\"padding:5px;margin:5px;\" /\u003e\n\u003cdiv\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaurav-gosain%2Fuadmin-railway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaurav-gosain%2Fuadmin-railway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaurav-gosain%2Fuadmin-railway/lists"}