-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
2,023 additions
and
20 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
Submodule docs
deleted from
3e75b2
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,8 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
__snapshots__ | ||
@generated | ||
node_modules |
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,18 @@ | ||
# .kodiak.toml | ||
version = 1 | ||
|
||
[merge] | ||
automerge_label = "automerge" | ||
require_automerge_label = false | ||
method = "squash" | ||
delete_branch_on_merge = true | ||
optimistic_updates = true | ||
prioritize_ready_to_merge = true | ||
notify_on_conflict = false | ||
|
||
[merge.message] | ||
title = "pull_request_title" | ||
body = "pull_request_body" | ||
include_pr_number = true | ||
body_type = "markdown" | ||
strip_html_comments = true |
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,7 @@ | ||
## Controlling container services | ||
The environment variable POSTIZ_APPS defaults to "", which means that all | ||
services will be started in a single container. However, you can only start | ||
specific services within the docker container by changing this environement variable. | ||
|
||
For most deployments, starting all services is fine. To scale out, you might want | ||
to start individual containers for "frontend", "backend", "worker" and "cron". |
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,8 @@ | ||
import { Callout } from 'nextra/components' | ||
|
||
<Callout type="info"> | ||
**NOTE:** This page is marked "earlydoc", or "early documentation", which means it might | ||
be brief, or contain information about parts of the app that are under heavy development. | ||
If you encounter issues with instructions found here, please check out the [support](/support) | ||
page for options. | ||
</Callout> |
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,7 @@ | ||
import { Callout } from "nextra/components"; | ||
|
||
## My Snippet | ||
|
||
<Callout type="info"> | ||
This is an example of a reusable snippet | ||
</Callout> |
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,39 @@ | ||
--- | ||
title: Configuration Reference | ||
--- | ||
|
||
At the moment, Postiz is entirely configured by environment variables. It is | ||
important to understand that any configuration change to environment variables | ||
will require an application restart. | ||
|
||
An example file of the most used configuration settings can be found here; [example postiz.env file](https://raw.githubusercontent.com/gitroomhq/postiz-app/main/.env.example) | ||
|
||
## Required Settings | ||
|
||
### `DATABASE_URL` | ||
|
||
eg: `postgresql://postiz-user:postiz-password@localhost:5432/postiz-db-local` | ||
|
||
Postgres is not strictly necessary, Postiz uses Prisma to connect to the database, so technically mariadb or other databases could be used. | ||
|
||
### `REDIS_URL` | ||
|
||
eg: `redis://localhost:6379` | ||
|
||
### `JWT_SECRET` | ||
|
||
A random string that should be unique for every installation, this is used to secure your JWT auth tokens. | ||
|
||
### `FRONTEND_URL` | ||
|
||
eg: `http://postiz.example.lan:4200` | ||
|
||
### `NEXT_PUBLIC_BACKEND_URL` | ||
|
||
eg: `http://postiz.example.lan:3000` | ||
|
||
### `BACKEND_INTERNAL_URL` | ||
|
||
If running everything in the same host/container: `http://localhost:3000` | ||
|
||
|
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,8 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
article a { | ||
color: white !important; | ||
font-weight: bold; | ||
} |
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,164 @@ | ||
--- | ||
title: Development Environment | ||
--- | ||
|
||
This is currently the recommended option to install Postiz in a supportable configuration. The docker images are in active and heavy development for now. | ||
|
||
## Tested configurations | ||
|
||
- MacOS | ||
- Linux (Fedora 40) | ||
|
||
Naturally you can use these instructions to setup a development environment on any platform, but there may not be much experience in the community to help you with any issues you may encounter. | ||
|
||
## Prerequisites | ||
|
||
This guide will ask you to install & configure several services exaplained below. | ||
|
||
### Prerequisite Cloud Services | ||
|
||
- **[Cloudflare R2](https://cloudflare.com)** - for uploads (optional, can use local machine). | ||
- **Social Media API details** - various API keys and secrets (more details later) for services you want to use; reddit, X, Instagram, etc.. | ||
|
||
### Optional Cloud Services | ||
|
||
- **[Resend account](https://resend.com)** - for user activation and email notifications. | ||
|
||
### Prerequisite Local Services | ||
|
||
- **Node.js** - for running the code! (version 18+) | ||
- **PostgreSQL** - or any other SQL database (instructions beleow suggest Docker) | ||
- **Redis** - for handling worker queues (instructions below suggest Docker) | ||
|
||
We have some messages from users who are using Windows, which should work, but they are not tested well yet. | ||
|
||
## Installation Instructions | ||
|
||
### NodeJS (version 18+) | ||
|
||
A complete guide of how to install NodeJS can be found [here](https://nodejs.org/en/download/). | ||
|
||
### PostgreSQL (or any other SQL database) & Redis | ||
|
||
You can choose **Option A** to **Option B** to install the database. | ||
|
||
#### Option A) Postgres and Redis as Single containers | ||
|
||
You can install [Docker](https://www.docker.com/products/docker-desktop) and run: | ||
|
||
```bash Terminal | ||
docker run -e POSTGRES_USER=root -e POSTGRES_PASSWORD=your_password --name postgres -p 5432:5432 -d postgres | ||
docker run --name redis -p 6379:6379 -d redis | ||
``` | ||
|
||
#### Option B) Postgres and Redis as docker-compose | ||
|
||
Download the [docker-compose.yaml file here](https://raw.githubusercontent.com/gitroomhq/postiz-app/main/docker-compose.dev.yaml), | ||
or grab it from the repository in the next step. | ||
|
||
```bash Terminal | ||
docker compose -f "docker-compose.dev.yaml" up | ||
``` | ||
|
||
## Build Postiz | ||
|
||
<Steps> | ||
<Step title="Clone the repository"> | ||
```bash Terminal | ||
git clone https://github.com/gitroomhq/gitroom | ||
``` | ||
</Step> | ||
|
||
<Step title="Set environment variables"> | ||
Copy the `.env.example` file to `.env` and fill in the values | ||
|
||
An example file of the most used configuration settings can be found here; [example postiz.env file](https://raw.githubusercontent.com/gitroomhq/postiz-app/main/.env.example) | ||
|
||
There is also a [configuration reference](/configuration/reference) page that goes into more detail. | ||
|
||
```bash .env | ||
# Required Settings | ||
DATABASE_URL="postgresql://postiz-user:postiz-password@localhost:5432/postiz-db-local" | ||
REDIS_URL="redis://localhost:6379" | ||
JWT_SECRET="random string for your JWT secret, make it long" | ||
FRONTEND_URL="http://localhost:4200" | ||
NEXT_PUBLIC_BACKEND_URL="http://localhost:3000" | ||
BACKEND_INTERNAL_URL="http://localhost:3000" | ||
|
||
# Optional. Your upload directory path if you host your files locally. | ||
UPLOAD_DIRECTORY="/opt/postiz/uploads/" | ||
|
||
# Optional: your upload directory slug if you host your files locally. | ||
NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY="" | ||
|
||
## This is a dummy key, you must create your own from Resend. | ||
## If this variable exists, user activation is required. | ||
## If it is commented out, users are activated automatically. | ||
#RESEND_API_KEY="RzeTwHijvxvPUerScFcenUZUALuQJzSaGSMJ" | ||
|
||
## These are dummy values, you must create your own from Cloudflare. | ||
## Remember to set your public internet IP address in the allow-list for the API token. | ||
CLOUDFLARE_ACCOUNT_ID="QhcMSXQyPuMCRpSQcSYdEuTYgHeCXHbu" | ||
CLOUDFLARE_ACCESS_KEY="dcfCMSuFEeCNfvByUureMZEfxWJmDqZe" | ||
CLOUDFLARE_SECRET_ACCESS_KEY="zTTMXBmtyLPwHEdpACGHgDgzRTNpTJewiNriLnUS" | ||
CLOUDFLARE_BUCKETNAME="postiz" | ||
CLOUDFLARE_BUCKET_URL="https://QhcMSXQyPuMCRpSQcSYdEuTYgHeCXHbu.r2.cloudflarestorage.com/" | ||
CLOUDFLARE_REGION="auto" | ||
|
||
# Social Media API Settings | ||
X_API_KEY="Twitter API key for normal oAuth not oAuth2" | ||
X_API_SECRET="Twitter API secret for normal oAuth not oAuth2" | ||
LINKEDIN_CLIENT_ID="Linkedin Client ID" | ||
LINKEDIN_CLIENT_SECRET="Linkedin Client Secret" | ||
REDDIT_CLIENT_ID="Reddit Client ID" | ||
REDDIT_CLIENT_SECRET="Linkedin Client Secret" | ||
GITHUB_CLIENT_ID="GitHub Client ID" | ||
GITHUB_CLIENT_SECRET="GitHub Client Secret" | ||
|
||
|
||
# Developer Settings | ||
NX_ADD_PLUGINS=false | ||
IS_GENERAL="true" # required for now | ||
``` | ||
|
||
</Step> | ||
|
||
<Step title="Install the dependencies"> | ||
```bash Terminal | ||
npm install | ||
``` | ||
</Step> | ||
|
||
<Step title="Generate the prisma client and run the migrations"> | ||
```bash Terminal | ||
npm run prisma-db-push | ||
``` | ||
</Step> | ||
|
||
<Step title="Run the project"> | ||
```bash Terminal | ||
npm run dev | ||
``` | ||
</Step> | ||
</Steps> | ||
|
||
If everything is running successfully, open http://localhost:4200 in your browser! | ||
|
||
If everything is not running - you had errors in the steps above, please head over to our [support](/support) page. | ||
|
||
## Next Steps | ||
|
||
<CardGroup cols={2}> | ||
<Card title="How it works" icon="screwdriver-wrench" href="/howitworks"> | ||
Learn the architecture of the project | ||
</Card> | ||
<Card title="Email notifications" icon="envelope" href="/emails"> | ||
Set up email for notifications | ||
</Card> | ||
<Card title="GitHub" icon="code-branch" href="/github"> | ||
Set up github for authentication and sync | ||
</Card> | ||
<Card title="Providers" icon="linkedin" href="/providers/x/x"> | ||
Set up providers such as Linkedin, X and Reddit | ||
</Card> | ||
</CardGroup> |
Oops, something went wrong.