Closed sFritsch09 closed 5 months ago
I don't have much experience with K8S so I won't be able to help. That said, I plan on improving the backend/self-hosting logs. As-is, it's been enough for the Cloud and simple Docker-based self-hosting, but it's indeed a bit limited.
If you have any suggestions on that front, I'm happy to hear them.
That's alright just for the protocol:
Once it is working for me I will share the configuration for your documentation on how to deploy to K8s :)
Now besides Kubernetes, I set a subdomain for App to app.mydomain.com
and API to api.mydomain.com
and I try to register in the frontend but get 500 in the console:
POST https://app.mydomain.com/api/v1/auth.register?batch=1 500 (Internal Server Error)
In Mongodb I could see the entry of the user in users
collection with db.users.find()
Is this the right endpoint for the frontend, because in the Swagger Docu I didn't see such endpoint?
The REST API (documented here and in the Swagger spec) is used primarly as a public API. The app uses primarly a separate, internal API, with endpoints like the one you've listed.
Not exactly sure what could be causing the issue but, if you're using multiple subdomains, be sure to set the COOKIE_DOMAIN
env var to, following your examples, mydomain.com
.
Thanks it is working now :)
COOKIE_DOMAIN
was not the main issue but I needed to put every service to their own DNS. I found some bugs, but after comparing them to the Cloud version, they appear to be identical.
I will add a step by step Guide here and then we can close this 🚀
It is beneficial to set the right envs and TLS for all Vrite Services.
The optimal approach is to generate a Helm Chart using Helm create vrite. This command will establish a Helm framework within your present directory under the release name vrite. The initial chart will serve as the frontend. To complete the setup, you must create three additional services within the vrite chart as SubCharts, namely vrite-api, vrite-collab, and vrite-assets.
You need the following envs as configMap or Secret: HOST: "0.0.0.0" PORT: "4444" NODE_ENV: production COOKIE_DOMAIN: BASEURL SECRET: GENERATED_SECRET MONGO_URL: mongodb://user:pass@mongodb.namespace.svc.cluster.local:27017/vrite REDIS_URL: redis://:pass@redis-master.namespace.svc.cluster.local:6379 SENDER_EMAIL: MAIL@gmail.com SENDER_NAME: Sebastian Fritsch SMTP_HOST: smtp.gmail.com SMTP_PORT: "587" SMTP_USERNAME: MAIL@gmail.com SMTP_PASSWORD: APP_PASS SMTP_SECURE: "true" PUBLIC_COLLAB_URL: http://VRITE_HELM_RELEASE_NAME.namespace.svc.cluster.local:5555 PUBLIC_APP_URL: http://VRITE_HELM_RELEASE_NAME.namespace.svc.cluster.local:3333 PUBLIC_API_URL: http://VRITE_HELM_RELEASE_NAME.namespace.svc.cluster.local:4444 PUBLIC_ASSETS_URL: http://VRITE_HELM_RELEASE_NAME.namespace.svc.cluster.local:8888 S3_BUCKET: vrite-images S3_ENDPOINT: http://minio.namespace.svc.cluster.local:9000 S3_REGION: us-east-1 S3_ACCESS_KEY: USER S3_SECRET_KEY: PASS S3_FORCE_PATH_STYLE: true"
For Vrite-API you can set Liveness- and ReadinessProbe to /swagger.json:
livenessProbe:
httpGet:
path: /swagger.json
port: http
scheme: HTTP
for Vrite-Assets you need to remove Liveness- and ReadinessProbe, the other ones can be set to path: /
I’m in the process of setting up Vrite on Kubernetes using a Helm Chart, but I’m facing issues with the Api and Assets—they’re not functioning, and I’m unable to retrieve any logs for debugging purposes. Additionally, when I access the vrite api Pod and execute node index.js, there’s no response or output. Has anyone successfully deployed Vrite on Kubernetes and can offer some guidance?