diff --git a/notification-server/Cargo.lock b/notification-server/Cargo.lock index fee6a132..0775aae8 100644 --- a/notification-server/Cargo.lock +++ b/notification-server/Cargo.lock @@ -2098,7 +2098,7 @@ dependencies = [ [[package]] name = "notification-server" -version = "0.2.5" +version = "0.2.6" dependencies = [ "anyhow", "async-trait", diff --git a/notification-server/Cargo.toml b/notification-server/Cargo.toml index 36631c71..a5071e89 100644 --- a/notification-server/Cargo.toml +++ b/notification-server/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Concordium AG developers@concordium.com"] edition = "2021" name = "notification-server" -version = "0.2.5" +version = "0.2.6" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/notification-server/Makefile b/notification-server/Makefile index 3a889bff..5e1e8390 100644 --- a/notification-server/Makefile +++ b/notification-server/Makefile @@ -2,6 +2,8 @@ all: docker-up wait-for-db create-tables +setup: setup-db setup-credentials + setup-db: @echo "Setting default password" @DB_PASSWORD=$$(openssl rand -base64 12) && \ @@ -9,10 +11,10 @@ setup-db: cat .env.template | envsubst > .env setup-credentials: - echo "Please enter the path to your Google application credentials file:" && \ + @echo "Please enter the path to your Google application credentials file:" read GOOGLE_APPLICATION_CREDENTIALS_PATH && \ mkdir -p secrets && \ - cp $$GOOGLE_APPLICATION_CREDENTIALS_PATH secrets/google-credentials.json && \ + cp $$GOOGLE_APPLICATION_CREDENTIALS_PATH secrets/google-credentials.json docker-up: @echo "Starting Docker containers..." @@ -40,4 +42,4 @@ create-tables: docker compose exec -T db psql --username=postgres < $$sql_file; \ done -.PHONY: setup all docker-up wait-for-db create-tables +.PHONY: setup setup-credential setup-db all docker-up wait-for-db create-tables diff --git a/notification-server/README.md b/notification-server/README.md index cc356785..d8143521 100644 --- a/notification-server/README.md +++ b/notification-server/README.md @@ -1,6 +1,6 @@ -# Notification server +# Notification api -Server to obtain information about particular account to device mappings and store them in a persistence layer. +API to obtain information about particular account to device mappings and store them in a persistence layer. # Notification service diff --git a/notification-server/src/bin/api.rs b/notification-server/src/bin/api.rs index 12ccbd40..1c38dda0 100644 --- a/notification-server/src/bin/api.rs +++ b/notification-server/src/bin/api.rs @@ -45,6 +45,7 @@ struct Args { listen_address: std::net::SocketAddr, #[arg( long = "prometheus-address", + help = "Listen address for the prometheus metrics server.", env = "NOTIFICATION_SERVER_PROMETHEUS_ADDRESS" )] prometheus_address: Option, diff --git a/notification-server/src/bin/service.rs b/notification-server/src/bin/service.rs index ee8111d7..399ca20c 100644 --- a/notification-server/src/bin/service.rs +++ b/notification-server/src/bin/service.rs @@ -93,9 +93,9 @@ struct Args { )] block_process_timeout_sec: u64, #[arg( - long = "listen-address", - help = "Listen address for the server.", - env = "NOTIFICATION_SERVER_METRICS_LISTEN_ADDRESS" + long = "prometheus-address", + help = "Listen address for the prometheus metrics server.", + env = "NOTIFICATION_SERVER_PROMETHEUS_ADDRESS" )] listen_address: Option, }