Skip to content

Commit a11889e

Browse files
feat: deployments path
1 parent 613af28 commit a11889e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

backend/.env.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ GH_ORG_ADMIN_TOKEN=
55

66
JWT_SECRET=
77

8+
DEPLOYMENTS_DIR=/deployments
9+
810
SERVER_PORT=8080
911

1012
CORS_ALLOWED_ORIGINS=https://maintos.metakgp.org,http://localhost:5173

backend/src/env.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//!
33
//! Each field in the struct `EnvVars` corresponds to an environment variable. The environment variable name will be in all capitals. The default values are set using the `arg()` macro of the `clap` crate. Check the source code for the defaults.
44
5+
use std::path::PathBuf;
6+
57
use clap::Parser;
68
use hmac::{digest::InvalidLength, Hmac, Mac};
79
use sha2::Sha256;
@@ -25,6 +27,11 @@ pub struct EnvVars {
2527
/// Github organization name
2628
pub gh_org_name: String,
2729

30+
// Config
31+
#[arg(env, default_value = "/deployments")]
32+
/// Directory in which all the project deployments are stored
33+
pub deployments_dir: PathBuf,
34+
2835
// Server
2936
#[arg(env, default_value = "8080")]
3037
/// The port the server listens on

0 commit comments

Comments
 (0)