🧑‍💻 Update docs (#1142)

This commit is contained in:
Luke Vella 2024-06-10 13:31:48 +01:00 committed by GitHub
parent 5d51f6d45d
commit 81d2f2c0bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 24 additions and 56 deletions

View file

@ -4,10 +4,9 @@ SECRET_PASSWORD=abcdef1234567890abcdef1234567890
# The base url where this instance is accessible, including the scheme.
# Example: https://example.com
NEXT_PUBLIC_BASE_URL=http://localhost:3000
NEXTAUTH_URL=$NEXT_PUBLIC_BASE_URL
# A connection string to your Postgres database
DATABASE_URL="postgres://postgres:postgres@localhost:5450/rallly"
DATABASE_URL="postgres://postgres:postgres@rallly_db:5450/rallly"
# Required to be able to send emails
SUPPORT_EMAIL=support@rallly.co

View file

@ -90,12 +90,11 @@ jobs:
- name: Create production build
run: yarn turbo build:test --filter=@rallly/web
- name: Generate Prisma Client
run: yarn db:generate
- name: Start services
run: yarn docker:up
- name: Setup database
run: |
yarn dx
run: yarn db:deploy
- name: Run tests
run: yarn test:integration

View file

@ -24,9 +24,11 @@ Built with [Next.js](https://github.com/vercel/next.js/), [Prisma](https://githu
Check out the [self-hosting docs](https://support.rallly.co/self-hosting) for more information on running your own instance of Rallly.
## Get started
## Local Installation
1. Clone the repository switch to the project directory
The following instructions are for running the project locally for development.
1. Clone the repository and switch to the project directory
```bash
git clone https://github.com/lukevella/rallly.git
@ -41,29 +43,34 @@ Check out the [self-hosting docs](https://support.rallly.co/self-hosting) for mo
3. Setup environment variables
Create a `.env` file by copying `.env.development`. This will be were you can set your [configuration options](https://support.rallly.co/self-hosting/configuration-options).
```bash
cp sample.env .env
cp .env.development .env
```
Create a `.env` file by copying `sample.env` then open it and set the required [configuration options](https://support.rallly.co/self-hosting/configuration-options).
**Note:** `.env.development` is preconfigured with default values for development. You can leave these as is for local development.
4. Setup the database
4. Setup database
If you don't have a postgres database running locally, you can spin up a new database using docker by running:
You will need to have [Docker](https://docs.docker.com/get-docker/) installed and running to run the database using the provided docker-compose file.
To start the database, run:
```
yarn dx
yarn docker:up
```
If you already have a postgres database, you can run the migrations and seed the database by running:
Next run the following command to setup the database:
```
yarn db:setup
yarn db:reset
```
This will:
- run migrations to create the database schema
- delete the existing database (if it exists)
- run migrations to create a new database schema
- seed the database with test users and random data
5. Start the Next.js server

View file

@ -50,9 +50,7 @@ These variables need to be configured to let Rallly send out transactional email
This email will be shown as the contact email for support queries.
</ParamField>
<ParamField path="SMTP_HOST" required>
The host address of your SMTP server
</ParamField>
<ParamField path="SMTP_HOST">The host address of your SMTP server</ParamField>
<ParamField path="SMTP_PORT" default="25 or 465">
The port of your SMTP server

View file

@ -3,7 +3,6 @@
"private": true,
"version": "3.7.0",
"scripts": {
"dx": "run-s docker:up db:setup",
"dev": "dotenv -c development -- turbo dev --filter=@rallly/web",
"dev:emails": "turbo dev --filter=@rallly/emails",
"dev:landing": "dotenv -c development turbo dev --filter=@rallly/landing",
@ -15,10 +14,8 @@
"db:generate": "turbo db:generate",
"db:migrate": "prisma migrate dev",
"db:reset": "prisma migrate reset",
"db:seed": "yarn workspace @rallly/database db:seed",
"docker:up": "docker compose -f docker-compose.dev.yml up -d && wait-on --timeout 60000 tcp:localhost:5450",
"docker:down": "docker compose -f docker-compose.dev.yml down --volumes --remove-orphans",
"db:setup": "run-s db:deploy db:generate db:seed",
"test:integration": "turbo test:integration",
"test:unit": "turbo test:unit",
"lint": "turbo lint",

View file

@ -1,33 +0,0 @@
# REQUIRED CONFIG
# A random 32-character secret key used to encrypt user sessions
SECRET_PASSWORD=
# The base url where this instance is accessible, including the scheme.
# Example: https://example.com
NEXT_PUBLIC_BASE_URL=http://localhost:3000
NEXT_PUBLIC_APP_BASE_URL=http://localhost:3000
# A connection string to your Postgres database
DATABASE_URL=
# EMAIL CONFIG (required for sending emails)
# All outgoing emails will show this email as the sender's email address, which also serves as the support email.
SUPPORT_EMAIL=
# The host address of your SMTP server
SMTP_HOST=localhost
# The port of your SMTP server
SMTP_PORT=25
# Set to "true" if SSL is enabled for your SMTP connection
SMTP_SECURE=false
# The username (if auth is enabled on your SMTP server)
SMTP_USER=
# The password (if auth is enabled on your SMTP server)
SMTP_PWD=
# OPTIONAL CONFIG
# Comma separated list of email addresses that are allowed to register and login.
# You can use wildcard syntax to match a range of email addresses.
# Example: "john@example.com,jane@example.com" or "*@example.com"
ALLOWED_EMAILS=

View file

@ -28,6 +28,7 @@
"cache": true
},
"test:integration": {
"dependsOn": ["@rallly/database#db:generate"],
"cache": true
},
"db:generate": {