Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align env variables #209

Merged
merged 6 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion notification-server/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion notification-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Concordium AG [email protected]"]
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

Expand Down
8 changes: 5 additions & 3 deletions notification-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

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) && \
export DB_PASSWORD=$$DB_PASSWORD && \
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..."
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions notification-server/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions notification-server/src/bin/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::net::SocketAddr>,
Expand Down
6 changes: 3 additions & 3 deletions notification-server/src/bin/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
lassemand marked this conversation as resolved.
Show resolved Hide resolved
)]
listen_address: Option<std::net::SocketAddr>,
}
Expand Down