Deploy your uAdmin project and host it with a single click (and a few more steps 👀) !
  • JavaScript 54.2%
  • HTML 24.6%
  • CSS 20.8%
  • Go 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gaurav Gosain f3de3119f9 fix????
2022-09-22 17:09:54 +04:00
.github Create dependabot.yml 2022-09-14 16:16:09 +04:00
_includes update 2022-09-13 12:40:43 +04:00
assets updated docs 2022-09-11 20:20:25 +04:00
media/otp uadmin-railway-init 2022-09-11 11:25:45 +04:00
static update database to use same instance 2022-09-11 15:37:04 +04:00
templates/uadmin fix???? 2022-09-22 17:09:54 +04:00
.gitignore fix???? 2022-09-22 17:09:54 +04:00
_config.yml Update _config.yml 2022-09-20 13:03:02 +04:00
favicon-32x32.png updated favicon 2022-09-12 23:11:48 +04:00
go.mod uadmin-railway-init 2022-09-11 11:25:45 +04:00
go.sum uadmin-railway-init 2022-09-11 11:25:45 +04:00
main.go reorganized code 2022-09-11 23:44:06 +04:00
README.md Update README.md 2022-09-22 16:13:44 +04:00
setup.go removed the fix (it didnt work 😭) 2022-09-12 11:06:40 +04:00

Golang and uAdmin CI/CD using 🚅Railway!

Deploy on Railway

Steps to Deploy

  • Make sure to create a Github account and link it with 🚅Railway
  • Click Deploy on Railway

  • Give your new Repository a name (and select the visibility if you want to make it private)
  • Set the Environment Variables to the following (you can change the port as per your needs):
Value env variable
1 CGO_ENABLED
8080 PORT
gcc NIXPACKS_PKGS
encryption key used for encrypting and decrypting the database KEY
salt used for encrypting and decrypting the database SALT

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)

  • and finally click on Deploy

TA-DA! 🎉 Your app is deployed!

  • A github repository will be created with the name you gave in the previous step
  • A uadmin instance is run
  • It is hosted on a live URL (which you can find in the Deployments tab of your project)
  • The expected port is exposed
  • An SSL certificate is generated
  • A MySQL database is automatically created and linked to uAdmin
  • The database is encrypted using the KEY and SALT environment variables

All that with a click of a button and a few environment variables!

Finally, to setup this repository locally, you can follow the steps below:

  • Head over to github and clone the repository that was created for you.
  • Clicking on MySQL on the railway dashboard will give you the following details:
    • 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.

hostMYSQLHOST

portMYSQLPORT

userMYSQLUSER

passwordMYSQLPASSWORD

nameMYSQLDATABSE

  • 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:
{
  "type": "mysql",
  "name": "railway",
  "user": "root",
  "password": "********************",
  "host": "*********************.railway.app",
  "port": 1234
}
  • 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:
{
  "KEY": "*********************",
  "SALT": "*********************"
}

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):

go mod download; go build .; ./railway

Commit these changes to the repository and push them to github.

Now for the cool part!

Since 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!

To fix:

[  ERROR ]   Hanlder.NewLogger. Unix syslog delivery error

Update on the above error: The issue is solved in HEAD and will be releases in a new version with the update. (~Internal Sources 👀)

About me

GH WidgetBox

Star History

Star History Chart

GitHub Language Count GitHub Top Language GitHub Issues GitHub Closed Issues GitHub Pull Requests GitHub Closed Pull Requests GitHub Contributors GitHub Last Commit GitHub Commit Activity (Week)