How to deploy Hasura on ACI as long-running process #8919
-
Hi, I have hasura running on a private ACI container instance inside a virtual net fronted by API Gateway that routes traffic using the containers IP. Cannot address the container using FQDN because ACI does not support FQDN for private containers. So when container restarts for whatever reason, it gets assigned a new IP, and API Gateway doesn't get updated, so application breaks. So, I need a way to keep the container running to prevent restarts. Microsoft recommends using command like resource "azurerm_container_group" "containers" {
restart_policy = "OnFailure"
...
container {
name = "hasura"
image = "hasura/graphql-engine:v2.11.1"
...
commands = [
"/bin/sh",
"-c",
"nohup tail -f /dev/null &; graphql-engine serve --enable-console"
]
...
}
} But not having any luck... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
well, this works, but not sure how to test that this is doing what I want, ie preventing restarts.
|
Beta Was this translation helpful? Give feedback.
-
If your use case demands a static IP address for a container, see if this helps: https://www.howtogeek.com/devops/how-to-assign-a-static-ip-to-a-docker-container/ |
Beta Was this translation helpful? Give feedback.
If your use case demands a static IP address for a container, see if this helps:
https://www.howtogeek.com/devops/how-to-assign-a-static-ip-to-a-docker-container/