eggsovereasy
eggsovereasy
RRailway
Created by eggsovereasy on 12/20/2023 in #✋|help
Creating service using GraphQL API
I'm trying to create a service using the GraphQL API using the serviceCreate mutation, but have two problems 1. How do I send in variables? The doc comment in the GQL schema says "The ServiceVariables scalar type represents values as the TypeScript type: Record<string, string>. Example: "{ foo: 'bar', baz: 'qux' }". So I tried exactly that with this mutation:
mutation ($input: ServiceCreateInput!) {
serviceCreate(input: $input) {
id
}
}
mutation ($input: ServiceCreateInput!) {
serviceCreate(input: $input) {
id
}
}
and input
{
"input": {
"environmentId": "<<REDACTED>>",
"name": "Worker",
"projectId": "<<REDACTED>>",
"branch": "main",
"variables": "{ foo: 'bar', baz: 'qux' }",
"source": {
"repo": "https://github.com/<<REDACTED>>"
}
}
}
{
"input": {
"environmentId": "<<REDACTED>>",
"name": "Worker",
"projectId": "<<REDACTED>>",
"branch": "main",
"variables": "{ foo: 'bar', baz: 'qux' }",
"source": {
"repo": "https://github.com/<<REDACTED>>"
}
}
}
The service does get created, but the variables come in as:
0={
1=
2=f
3=o
4=o
5=:
6=
7='
8=b
9=a
10=r
11='
12=,
13=
14=b
15=a
16=z
17=:
18=
19='
20=q
21=u
22=x
23='
24=
25=}
0={
1=
2=f
3=o
4=o
5=:
6=
7='
8=b
9=a
10=r
11='
12=,
13=
14=b
15=a
16=z
17=:
18=
19='
20=q
21=u
22=x
23='
24=
25=}
2. My other issue, is that the service does not deploy after it is created. I found the mutation serviceInstanceRedeploy but that only seems to work for services that have already deployed before.
27 replies
RRailway
Created by eggsovereasy on 6/28/2023 in #✋|help
nginx proxy_pass to private network
Hello, I am trying out the new private networking feature. I have a react application running in a service and a container running nginx in another service. I would like to have a public url for the nginx container, but only private for the react app. I setup nginx to do a reverse proxy to the app, which works fine if I use a public url for the react app, but I can't get to work at all with the private url. nginx: [emerg] host not found in upstream "gsandf-com-app.railway.internal" in /etc/nginx/conf.d/default.conf:29 Also, is there an ENV variable like RAILWAY_SERVER_{name}_URL for private urls?
24 replies
RRailway
Created by eggsovereasy on 6/14/2023 in #✋|help
Is there a way to view the invoice by project.
Under "usage" it has everything broken down by project, which is very nice. However, once the invoice is paid and available for download it seems to be no longer possible to see actual costs at the project level. This would be very useful to us.
9 replies
RRailway
Created by eggsovereasy on 5/19/2023 in #✋|help
RAILWAY_{serviceName}_STATIC_URL not working
I have an nginx container proxying to an application container and am trying to reference the application container url. The application container is named 'frontend' so I set an env variable equal to ${{RAILWAY_FRONTEND_STATIC_URL}} but it's coming through blank. What am I doing wrong here? product id: f44954e4-11aa-4f45-9e1a-302641b5dc42 using the 'separate-nginx' environment
16 replies