fix: stabilize container validator startup

This commit is contained in:
richjohnrambo
2026-08-20 13:28:28 +08:00
parent 43e8af68d6
commit c09ea2ac53
2 changed files with 9 additions and 0 deletions
+2
View File
@@ -45,6 +45,7 @@ ENV MEDIA_HANDLER=fs
ENV FS_CORS_ORIGINS='["*"]' ENV FS_CORS_ORIGINS='["*"]'
ENV AWS_CORS_ORIGINS='["*"]' ENV AWS_CORS_ORIGINS='["*"]'
ENV SMTP_HOST_URL='http://localhost:6060' ENV SMTP_HOST_URL='http://localhost:6060'
ENV TEL_HOST_URL='http://localhost:6060'
ENV TLS_ENABLED=false ENV TLS_ENABLED=false
ENV FCM_PUSH_ENABLED=false ENV FCM_PUSH_ENABLED=false
ENV FCM_INCLUDE_ANDROID_NOTIFICATION=true ENV FCM_INCLUDE_ANDROID_NOTIFICATION=true
@@ -68,6 +69,7 @@ WORKDIR /opt/tinode
COPY docker/tinode/config.template . COPY docker/tinode/config.template .
COPY docker/tinode/entrypoint.sh . COPY docker/tinode/entrypoint.sh .
COPY tinode-db/credentials.sh . COPY tinode-db/credentials.sh .
COPY server/templ ./templ
COPY --from=build /out/tinode . COPY --from=build /out/tinode .
COPY --from=build /out/init-db . COPY --from=build /out/init-db .
COPY --from=build /out/apply-hotgo-tenant-db . COPY --from=build /out/apply-hotgo-tenant-db .
+7
View File
@@ -491,6 +491,13 @@ func main() {
globals.immutableTagNS[name] = true globals.immutableTagNS[name] = true
} }
if len(vconf.Required) == 0 && name != "tel" {
// Optional product phone registration uses the tel validator even
// when it is not required for an auth level. Other validators stay
// disabled when they are not explicitly required.
continue
}
var reqLevels []auth.Level var reqLevels []auth.Level
for _, req := range vconf.Required { for _, req := range vconf.Required {
lvl := auth.ParseAuthLevel(req) lvl := auth.ParseAuthLevel(req)