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 is8080
and I recommend not changing it unless necessary)
Deploy
Deployments
tab of your project)KEY
and SALT
environment variables
Finally, to setup this repository locally, you can follow the steps below:
host
, port
, user
, password
and name
can be found in the above screenshot from the fields MYSQLHOST
, MYSQLPORT
, MYSQLUSER
, MYSQLPASSWORD
and MYSQLDATABSE
respectively.host ⇄ MYSQLHOST
port ⇄ MYSQLPORT
user ⇄ MYSQLUSER
password ⇄ MYSQLPASSWORD
name ⇄ MYSQLDATABSE
.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
}
.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.
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 👀)