Move lab3 to lab4

This commit is contained in:
2026-11-04 22:57:50 +03:00
parent ec540a1a72
commit 319f0d519e
167 changed files with 7591 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
ktor {
application {
modules = [com.mtusi.messenger.main.AppKt.module]
}
deployment {
host = "127.0.0.1"
port = 8080
}
}
+9
View File
@@ -0,0 +1,9 @@
authentication {
realm = "messenger"
sessionTtlSeconds = 3600
sessionCacheTtlSeconds = 60
# Collapse concurrent cache misses for one token into a single database lookup
sessionCacheSingleFlight = true
# A logout answers 204 only after its tombstone is in Redis; retries up to this long, then 503
sessionRevokeTimeoutMs = 8000
}
+23
View File
@@ -0,0 +1,23 @@
cors {
# Defaults to false
#allowAnyHost = true
# Swagger UI sends "Try it out" to the contract server http://localhost:8080; pages opened elsewhere need these.
allowedHosts = [
{ host = "localhost:8080", schemes = ["http"] }
{ host = "localhost:8081", schemes = ["http"] }
{ host = "127.0.0.1:8080", schemes = ["http"] }
{ host = "127.0.0.1:8081", schemes = ["http"] }
]
# Defaults to true
#allowAnyMethod = true
#allowedMethods = [GET, POST, PATCH, PUT, DELETE, OPTIONS]
allowAnyHeader = true
#allowedHeaders = []
exposedHeaders = [X-Request-Id, X-Instance-Id, WWW-Authenticate]
# Browsers send Origin on same-origin POST too, e.g. Swagger UI served by the API itself.
allowSameOrigin = true
}
+12
View File
@@ -0,0 +1,12 @@
database {
host = "localhost"
port = 5432
name = "messenger"
username = "username"
password = "password"
maxPoolSize = 10
connectionTimeoutMs = 2000
statementTimeoutMs = 5000
# A single local process migrates itself; replicas in compose leave it to the `migrate` service
migrateOnStart = true
}
+4
View File
@@ -0,0 +1,4 @@
instance {
# X-Instance-Id of this process. Defaults to HOSTNAME (the short container id in Docker), else a random alias
#id = "dev"
}
+4
View File
@@ -0,0 +1,4 @@
messages {
# How long a stored Idempotency-Key answers a retry with the original message (contract: at least 24 h)
idempotencyTtlSeconds = 86400
}
+8
View File
@@ -0,0 +1,8 @@
redis {
host = "localhost"
port = 6379
# Only if the local Redis requires AUTH
#password = ""
connectTimeoutMs = 500
commandTimeoutMs = 500
}