Comments (5)
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 š
from vrite.
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.
from vrite.
That's alright just for the protocol:
- I changed livenessProbe and readinessProbe of api to /swagger.json
- For assets I removed liveness- and readinessProbe
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?
from vrite.
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
.
from vrite.
How To Deploy Vrite On K8s:
It is beneficial to set the right envs and TLS for all Vrite Services.
Requirements
- Minio: https://artifacthub.io/packages/helm/bitnami/minio
- MongoDB: https://artifacthub.io/packages/helm/bitnami/mongodb
- Redis: https://artifacthub.io/packages/helm/bitnami/redis
- Certmanager for TLS
Helm Creation
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.
Environments
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:[email protected]:27017/vrite
REDIS_URL: redis://:[email protected]:6379
SENDER_EMAIL: [email protected]
SENDER_NAME: Sebastian Fritsch
SMTP_HOST: smtp.gmail.com
SMTP_PORT: "587"
SMTP_USERNAME: [email protected]
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"
Liveness- and ReadinessProbe
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: /
from vrite.
Related Issues (20)
- Show running Gifs in Preview HOT 3
- Request to enable GitHub Private Vulnerability Reporting in vrite repository HOT 2
- Feat: Full nestable table content support HOT 3
- Captions for images HOT 1
- Change a text block wrapper after it is specified. HOT 4
- Feat: Embed X Posts HOT 1
- How do you use the custom data property? HOT 2
- Feat: Changesets
- docs: unclear how to add rich content via api HOT 6
- Missing app and api in docker-compose HOT 1
- Fix Error: Select element extension in editor HOT 1
- GitOps support? HOT 3
- Feature: Github source control integration: Ensure limited permissions HOT 1
- Bug: Setting source control transformer to mdx sets it back to markdown HOT 2
- Bug: Importing a table from MDX-based source-control renders it as text. HOT 1
- Link invalid when testing invitation HOT 3
- GitLab support
- Add Dockerfile for Extension Service HOT 1
- RSS/Atom feed for blog? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vrite.