NumberChords services

This commit is contained in:
maurice
2025-11-22 17:37:45 +01:00
parent 95cdf02105
commit 55a64cf546
6 changed files with 183 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
user = "podman"
[service]
name = "numberchords-api"
host = "nc-api"
image = "numberchords-api"
network = "nc-test"
depend = ["numberchords-db.service"]
[environment]
ASPNETCORE_ENVIRONMENT = "Test"
# "NC_Security__OtherIssuerKeys__identity.numberchords.com__AuthPublicKey" = ""
[[secrets]]
key = "connection_string"
target = "Database__ConnectionString"
[[secrets]]
key = "api_secret_key"
target = "Security__AuthSecretKey"
[[secrets]]
key = "api_private_key"
target = "Security__AuthPrivateKey"
[[secrets]]
key = "mollie_api_key"
target = "Payment__MollieApiKey"
[[secrets]]
key = "smtp_username"
target = "Email__SmtpUsername"
[[secrets]]
key = "smtp_password"
target = "Email__SmtpPassword"
[[networks]]
name = "nc-test"
group = "caddy"

View File

@@ -0,0 +1,28 @@
user = "podman"
[service]
name = "numberchords-db"
host = "nc-db"
image = "mongodb/mongodb-community-server:latest"
network = "nc-test"
[[volumes]]
source = "nc_database_test"
target = "/data/db"
create = true
[[environment_secrets]]
name = "MONGO_INITDB_ROOT_USERNAME"
secret = "mongo_username"
[[environment_secrets]]
name = "MONGO_INITDB_ROOT_PASSWORD"
secret = "mongo_password"
[[ports]]
host = 27017
container = 27017
[[networks]]
name = "nc-test"
group = "caddy"

View File

@@ -0,0 +1,31 @@
user = "podman"
[service]
name = "numberchords-identity"
host = "nc-identity"
image = "numberchords-identity"
network = "nc-test"
depend = ["numberchords-db.service"]
[environment]
ASPNETCORE_ENVIRONMENT = "Test"
[[secrets]]
key = "connection_string"
target = "Database__ConnectionString"
[[secrets]]
key = "id_secret_key"
target = "Security__AuthSecretKey"
[[secrets]]
key = "id_private_key"
target = "Security__AuthPrivateKey"
[[secrets]]
key = "api_secret_key"
target = "Security__OtherIssuerKeys_api-test.numberchords.com__AuthSecretKey"
[[networks]]
name = "nc-test"
group = "caddy"

View File

@@ -0,0 +1,47 @@
http://test.numberchords.com {
import https-redir
}
http://test.cijferakkoorden.nl {
import https-redir
}
http://api-test.numberchords.com {
import https-redir
}
http://identity-test.numberchords.com {
import https-redir
}
https://test.numberchords.com {
import https
import compression
import default-headers
log access
reverse_proxy nc-web:3000
}
https://test.cijferakkoorden.nl {
import https
import compression
import default-headers
log access
reverse_proxy nc-web:3000
}
https://api-test.numberchords.com {
import https
import compression
import default-headers
log access
reverse_proxy nc-api:8080
}
https://identity-test.numberchords.com {
import https
import compression
import default-headers
log access
reverse_proxy nc-identity:8080
}

View File

@@ -0,0 +1,12 @@
# Set these secrets:
- `connection_string`: MongoDB connection string
- `api_secret_key`: 32-byte base64 secret
- `api_private_key`: 32-byte base64 secret
- `id_secret_key`: 32-byte base64 secret
- `id_private_key`: 32-byte base64 secret
- `mollie_api_key`: Mollie API key
- `smtp_username`: SMTP email account username
- `smtp_password`: SMTP email account password
- `mongo_username`: MongoDB root username
- `mongo_password`: MongoDB root password

View File

@@ -0,0 +1,25 @@
user = "podman"
[service]
name = "numberchords-web"
host = "nc-web"
image = "numberchords-web"
network = "nc-test"
depend = ["numberchords-api.service", "numberchords-identity.service"]
[environment]
PRIVATE_DATABASE_NAME = "numberchords-test"
PRIVATE_DEFAULT_AUDIENCE="api-test.numberchords.com"
PROTOCOL_HEADER="x-forwarded-proto"
HOST_HEADER="x-forwarded-host"
BODY_SIZE_LIMIT="10000000"
PRIVATE_BASE_URL="http://nc-api:8080"
PRIVATE_IDENTITY_BASE_URL="http://nc-identity:8080"
[[environment_secrets]]
name = "PRIVATE_CONNECTION_STRING"
secret = "connection_string"
[[networks]]
name = "nc-test"
group = "caddy"