Skip to content

Commit

Permalink
add restart policy restart = "unless-stopped" to all docker templat…
Browse files Browse the repository at this point in the history
…es (#38)
  • Loading branch information
matifali authored Dec 16, 2023
1 parent 6047163 commit 9c6c234
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions deeplearning-nvidia/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ resource "docker_container" "workspace" {
dns = ["1.1.1.1"]
command = ["sh", "-c", replace(coder_agent.main.init_script, "127.0.0.1", "host.docker.internal")]
env = ["CODER_AGENT_TOKEN=${coder_agent.main.token}"]
restart = "unless-stopped"

devices {
host_path = "/dev/nvidia0"
Expand Down
1 change: 1 addition & 0 deletions deeplearning/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ resource "docker_container" "workspace" {
dns = ["1.1.1.1"]
command = ["sh", "-c", replace(coder_agent.main.init_script, "127.0.0.1", "host.docker.internal")]
env = ["CODER_AGENT_TOKEN=${coder_agent.main.token}"]
restart = "unless-stopped"

devices {
host_path = "/dev/nvidia0"
Expand Down
1 change: 1 addition & 0 deletions matlab-cpu/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ resource "docker_container" "workspace" {
dns = ["1.1.1.1"]
entrypoint = ["sh", "-c", coder_agent.main.init_script]
env = ["CODER_AGENT_TOKEN=${coder_agent.main.token}"]
restart = "unless-stopped"

host {
host = "host.docker.internal"
Expand Down
1 change: 1 addition & 0 deletions matlab-gpu/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ resource "docker_container" "workspace" {
dns = ["1.1.1.1"]
entrypoint = ["sh", "-c", coder_agent.main.init_script]
env = ["CODER_AGENT_TOKEN=${coder_agent.main.token}"]
restart = "unless-stopped"

devices {
host_path = "/dev/nvidia0"
Expand Down

0 comments on commit 9c6c234

Please sign in to comment.