mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
Fix production gateways deployment
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
output "dns_name_servers" {
|
||||
value = module.google-cloud-dns.name_servers
|
||||
}
|
||||
|
||||
output "image_tag" {
|
||||
value = var.image_tag
|
||||
}
|
||||
|
||||
@@ -47,10 +47,6 @@ locals {
|
||||
name = "FIREZONE_API_URL"
|
||||
value = var.api_url
|
||||
},
|
||||
{
|
||||
name = "FIREZONE_NAME"
|
||||
value = "$(hostname)"
|
||||
},
|
||||
{
|
||||
name = "FIREZONE_ENABLE_MASQUERADE"
|
||||
value = "1"
|
||||
|
||||
@@ -107,7 +107,7 @@ write_files:
|
||||
TimeoutStartSec=0
|
||||
Restart=always
|
||||
ExecStartPre=/usr/bin/docker pull ${container_image}
|
||||
ExecStart=/usr/bin/docker run --rm --name=${container_name} --cap-add=NET_ADMIN --device="/dev/net/tun:/dev/net/tun" --network=host --env-file="/etc/firezone-gateway/.env" ${container_image}
|
||||
ExecStart=/bin/sh -c 'docker run --rm --name=${container_name} --cap-add=NET_ADMIN --volume /etc/firezone --device="/dev/net/tun:/dev/net/tun" --network=host --env FIREZONE_NAME=$(hostname) --env FIREZONE_ID=$(echo $RANDOM | md5sum | head -c 20; echo;) --env-file="/etc/firezone-gateway/.env" ${container_image}'
|
||||
ExecStop=/usr/bin/docker stop gateway
|
||||
ExecStopPost=/usr/bin/docker rm gateway
|
||||
|
||||
|
||||
Reference in New Issue
Block a user