-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- New self-hosting support through Docker - New customizable Wrapper block - New remote transformers for Git integration - Redesigned landing page - Redesigned docs - Improvements to the commenting system - Bug fixes and stability improvements
- Loading branch information
Showing
264 changed files
with
13,140 additions
and
4,837 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**/node_modules | ||
node_modules | ||
dist | ||
npm-debug.log | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,64 @@ | ||
# Database | ||
MONGO_URL= | ||
REDIS_URL= | ||
DATABASE= | ||
# Security | ||
# Basic (required) | ||
HOST=0.0.0.0 | ||
NODE_ENV=production | ||
|
||
# Cookies (optional - multi-domain setup) | ||
COOKIE_DOMAIN= | ||
|
||
# Security (required - JWT) | ||
SECRET= | ||
# Domains | ||
TOP_DOMAIN= | ||
CALLBACK_DOMAIN= | ||
# Serve | ||
HOST= | ||
|
||
# MongoDB (required) | ||
MONGO_URL=mongodb://mongodb:27017/vrite | ||
|
||
# Redis (required) | ||
REDIS_URL=redis://redis:6379 | ||
|
||
# Email (required) | ||
SENDER_EMAIL=hello@example.com | ||
SENDER_NAME=Example | ||
|
||
# One of following required: | ||
|
||
# Email (SMTP) | ||
SMTP_HOST= | ||
SMTP_PORT= | ||
SMTP_USER= | ||
SMTP_PASS= | ||
SMTP_SECURE= | ||
|
||
# Email (SendGrid) | ||
SENDGRID_API_KEY= | ||
SENDGRID_EMAIL_VERIFICATION_TEMPLATE_ID= | ||
SENDGRID_MAGIC_LINK_TEMPLATE_ID= | ||
SENDGRID_PASSWORD_CHANGE_VERIFICATION_TEMPLATE_ID= | ||
SENDGRID_WORKSPACE_INVITE_TEMPLATE_ID= | ||
SENDGRID_EMAIL_CHANGE_VERIFICATION_TEMPLATE_ID= | ||
EMAIL= | ||
SENDER_NAME= | ||
# S3 | ||
S3_BUCKET= | ||
S3_ENDPOINT= | ||
S3_REGION= | ||
S3_ACCESS_KEY= | ||
S3_SECRET_KEY= | ||
# GitHub OAuth2 | ||
|
||
# S3 (required - file storage) | ||
S3_BUCKET=vrite-images | ||
S3_ENDPOINT=http://minio:9000 | ||
S3_REGION=us-east-1 | ||
S3_ACCESS_KEY=user | ||
S3_SECRET_KEY=password | ||
S3_FORCE_PATH_STYLE=true | ||
|
||
# Service URLs (required) | ||
PUBLIC_COLLAB_URL=http://localhost:5555 | ||
PUBLIC_APP_URL=http://localhost:3333 | ||
PUBLIC_API_URL=http://localhost:4444 | ||
PUBLIC_ASSETS_URL=http://localhost:8888 | ||
|
||
# GitHub OAuth2 (optional - GitHub sign in) | ||
GITHUB_CLIENT_ID= | ||
GITHUB_CLIENT_SECRET= | ||
|
||
# GitHub App (optional - GitHub Git sync) | ||
GITHUB_APP_ID= | ||
GITHUB_APP_PRIVATE_KEY= | ||
GITHUB_APP_WEBHOOK_SECRET= | ||
GITHUB_APP_CLIENT_ID= | ||
GITHUB_APP_CLIENT_SECRET= | ||
# Frontend | ||
PUBLIC_COLLAB_HOST= | ||
PUBLIC_APP_HOST= | ||
PUBLIC_API_HOST= | ||
# Search | ||
OPENAI_API_KEY= | ||
OPENAI_ORGANIZATION= | ||
|
||
# Search (optional - Search) | ||
# WEAVIATE_API_KEY=password | ||
# WEAVIATE_URL=http://weaviate:8080 | ||
|
||
# AI (optional - AI "Q&A" search) | ||
# OPENAI_API_KEY= | ||
# OPENAI_ORGANIZATION= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build & publish | ||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- dockerfile: ./apps/backend/app/Dockerfile | ||
image: vriteio/vrite/app | ||
- dockerfile: ./apps/backend/api/Dockerfile | ||
image: vriteio/vrite/api | ||
- dockerfile: ./apps/backend/collaboration/Dockerfile | ||
image: vriteio/vrite/collaboration | ||
- dockerfile: ./apps/backend/assets/Dockerfile | ||
image: vriteio/vrite/assets | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ matrix.image }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | ||
with: | ||
context: . | ||
file: ${{ matrix.dockerfile }} | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,6 @@ yarn-error.log* | |
|
||
# turbo | ||
.turbo | ||
|
||
# React Email | ||
.react-email |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM node:18-alpine as base | ||
|
||
FROM base AS builder | ||
WORKDIR /app | ||
RUN apk add --no-cache libc6-compat && npm install -g turbo | ||
|
||
COPY . . | ||
|
||
RUN turbo prune --scope=@vrite/api --docker | ||
|
||
|
||
FROM base as installer | ||
WORKDIR /app | ||
|
||
RUN npm install -g pnpm@8.6.0 | ||
RUN npm install -g turbo | ||
|
||
COPY --from=builder /app/out/json/ . | ||
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml | ||
RUN pnpm i --frozen-lockfile | ||
|
||
COPY --from=builder /app/out/full/ . | ||
|
||
RUN pnpm rebuild -r | ||
RUN turbo run build --filter=@vrite/api | ||
|
||
FROM base AS runner | ||
WORKDIR /app | ||
|
||
# Install extra dependencies | ||
RUN npm install saslprep | ||
RUN addgroup --system --gid 1001 nodejs | ||
RUN adduser --system --uid 1001 app | ||
|
||
USER app | ||
COPY --from=installer --chown=app:nodejs /app/apps/backend/api/dist . | ||
CMD node index.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM node:18-alpine as base | ||
|
||
FROM base AS builder | ||
WORKDIR /app | ||
RUN apk add --no-cache libc6-compat && npm install -g turbo | ||
|
||
COPY . . | ||
|
||
RUN turbo prune --scope=@vrite/app --docker | ||
|
||
|
||
FROM base as installer | ||
WORKDIR /app | ||
|
||
RUN npm install -g pnpm@8.6.0 | ||
RUN npm install -g turbo | ||
|
||
COPY --from=builder /app/out/json/ . | ||
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml | ||
RUN pnpm i --frozen-lockfile | ||
|
||
COPY --from=builder /app/out/full/ . | ||
|
||
RUN pnpm rebuild -r | ||
RUN turbo run build --filter=@vrite/app | ||
|
||
FROM base AS runner | ||
WORKDIR /app | ||
|
||
# Install extra dependencies | ||
RUN npm install saslprep sharp | ||
RUN addgroup --system --gid 1001 nodejs | ||
RUN adduser --system --uid 1001 app | ||
|
||
USER app | ||
COPY --from=installer --chown=app:nodejs /app/apps/backend/app/dist . | ||
CMD node index.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.