Skip to content

Commit

Permalink
Display the DB URI and make sure the env variables make it to the ref…
Browse files Browse the repository at this point in the history
…actor_platform_rs binary
  • Loading branch information
jhodapp committed Dec 12, 2024
1 parent cd0a337 commit 87110b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ EXPOSE 4000

# Default command starts an interactive bash shell
# Set ENTRYPOINT to default to run the Rust binary with arguments
ENTRYPOINT ["/bin/bash", "-c", "/usr/local/bin/refactor_platform_rs"]
ENTRYPOINT ["/bin/bash", "-c", "/usr/local/bin/refactor_platform_rs -l $LOG_LEVEL_FILTER -i \"$BACKEND_INTERFACE\" -p \"$BACKEND_PORT\" -d \"$DATABASE_URL\" --allowed_origins=\"$ALLOWED_ORIGINS\""]

# Default CMD allows overriding with custom commands
CMD ["bash"]
3 changes: 2 additions & 1 deletion web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub(crate) mod extractors;
mod router;

pub async fn init_server(app_state: AppState) -> Result<()> {
info!("Connecting to DB with URI: {}", app_state.config.database_uri());
// Session layer
let session_store = PostgresStore::new(
app_state
Expand Down Expand Up @@ -70,7 +71,7 @@ pub async fn init_server(app_state: AppState) -> Result<()> {
.iter()
.filter_map(|origin| origin.parse().ok())
.collect::<Vec<HeaderValue>>();
debug!("allowed_origins: {:#?}", allowed_origins);
info!("allowed_origins: {:#?}", allowed_origins);

let cors_layer = CorsLayer::new()
.allow_methods([
Expand Down

0 comments on commit 87110b3

Please sign in to comment.