configure variable in VM ARGUMENTS

I would like to know how do I create a variable "VM Arguments" in the railway environment? currently I have a java application that basically needs a variable configured in the "vm arguments" to raise the properties according to the information. Highlighting, I've tried to create the variable in the variables tab, but without success. PROJECT ID: 6a70ac91-fc4e-46cf-8737-90c8c2dca9b0
Solution:
Use -Dspring.profiles.active-prod
Jump to solution
10 Replies
Percy
Percy15mo ago
Project ID: 8c308834-dfad-4d96-9e11-243b8213f7b0
Brody
Brody15mo ago
tell me more about this VM arguments variable, where would it normally be used? in the docker run command or something? also, do not open duplicate threads please
JeffersonXimenes
JeffersonXimenes15mo ago
Sorry for the duplicate thread. I'm new to the platform lol.. But then... this variable can be used in the "Arguments" tab of the JAVA project. Currently, I have configured a spring profile. Aiming to have control of a properties for development and production environment. However, in my local environment I can set this variable as follows (attached image). However, when trying to do this configuration on the server, I don't get success.
Brody
Brody15mo ago
@aleks this seems like something you'd know how to do
root
root15mo ago
Hmm, I might have some ideas. Let me go brave search some stuff Try setting the JAVA_OPTS variable in the Variables tab to the options you want.
JeffersonXimenes
JeffersonXimenes15mo ago
as instructed, I tried to define the JAVA_OPTS variable, but I was not successful, as shown below. I also tried defining the variable in other ways as you can see, but without success
JeffersonXimenes
JeffersonXimenes15mo ago
Solution
root
root15mo ago
Use -Dspring.profiles.active-prod
JeffersonXimenes
JeffersonXimenes15mo ago
it worked, friend. I put it wrong and didn't even pay attention. Thanks a lot for the support
root
root15mo ago
No problem! Glad it's working now
Want results from more Discord servers?
Add your server