Skip to content

Commit 79e3b4d

Browse files
committed
refactor: Remove envvar hotfix needed for 0.36.1
1 parent 5555424 commit 79e3b4d

3 files changed

Lines changed: 21 additions & 21 deletions

File tree

workflow/deployer-workflow/src/lib.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -502,22 +502,7 @@ fn start_final_vm(
502502
swap_size_mb: Some(FINAL_VM_SWAP_MB),
503503
tty: None,
504504
}),
505-
env: Some(vec![
506-
// Fix for Obelisk 0.36.1 - fly.io does not allow unsetting those env vars set in Dockerfile.
507-
// Using [::] for when a port is not exposed and needs `fly proxy` forwarding.
508-
(
509-
"OBELISK__API__LISTENING_ADDR".to_string(),
510-
Some(format!("[::]:{API_INTERNAL_PORT}")),
511-
),
512-
(
513-
"OBELISK__EXTERNAL__LISTENING_ADDR".to_string(),
514-
Some(format!("[::]:{WEBHOOK_INTERNAL_PORT}")),
515-
),
516-
(
517-
"OBELISK__WEBUI__LISTENING_ADDR".to_string(),
518-
Some("[::]:8080".to_string()),
519-
),
520-
]),
505+
env: None,
521506
restart: Some(MachineRestart {
522507
max_retries: Some(MAX_VM_FAILURE_RETRIES),
523508
policy: RestartPolicy::OnFailure,

workflow/deployer-workflow/src/snapshots/obelisk_deployer_flyio__toml__tests__server_toml.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22
source: workflow/deployer-workflow/src/toml.rs
33
expression: server_toml
44
---
5+
[api]
6+
listening_addr = "[::]:5005"
57

68
[database.sqlite]
79
directory = "/volume/obelisk-sqlite"
810

911
[database.sqlite.pragma]
1012
cache_size = "3000"
1113

14+
[external]
15+
listening_addr = "[::]:9090"
16+
1217
[[http_server]]
1318
listening_addr = "[::]:9091"
1419
name = "healthcheck_server"
@@ -25,3 +30,6 @@ parallel_compilation = false
2530

2631
[wasm.codegen_cache]
2732
directory = "/volume/codegen"
33+
34+
[webui]
35+
listening_addr = "[::]:8080"

workflow/deployer-workflow/src/toml.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
use crate::generated::obelisk_flyio::workflow::types::ObeliskConfig;
2-
use crate::{HEALTHCHECK_INTERNAL_PORT, SQLITE_DIRECTORY_PATH, VOLUME_MOUNT_PATH};
2+
use crate::{
3+
API_INTERNAL_PORT, HEALTHCHECK_INTERNAL_PORT, SQLITE_DIRECTORY_PATH, VOLUME_MOUNT_PATH,
4+
WEBHOOK_INTERNAL_PORT,
5+
};
36
use anyhow::{Context, anyhow};
47
use toml::Table;
58

@@ -28,10 +31,14 @@ pub(crate) fn serialize_obelisk_toml(
2831

2932
let server_toml_template = format!(
3033
r#"
31-
wasm.cache_directory = "{VOLUME_MOUNT_PATH}/wasm"
32-
wasm.codegen_cache.directory = "{VOLUME_MOUNT_PATH}/codegen"
33-
34-
wasm.parallel_compilation = false
34+
api.listening_addr = "[::]:{API_INTERNAL_PORT}"
35+
webui.listening_addr = "[::]:8080"
36+
external.listening_addr = "[::]:{WEBHOOK_INTERNAL_PORT}"
37+
38+
[wasm]
39+
cache_directory = "{VOLUME_MOUNT_PATH}/wasm"
40+
codegen_cache.directory = "{VOLUME_MOUNT_PATH}/codegen"
41+
parallel_compilation = false
3542
3643
[database.sqlite]
3744
directory = "{SQLITE_DIRECTORY_PATH}"

0 commit comments

Comments
 (0)