mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-12 16:36:49 +02:00
🧑💻 Update docs (#1142)
This commit is contained in:
parent
5d51f6d45d
commit
81d2f2c0bd
7 changed files with 24 additions and 56 deletions
|
@ -4,10 +4,9 @@ SECRET_PASSWORD=abcdef1234567890abcdef1234567890
|
||||||
# The base url where this instance is accessible, including the scheme.
|
# The base url where this instance is accessible, including the scheme.
|
||||||
# Example: https://example.com
|
# Example: https://example.com
|
||||||
NEXT_PUBLIC_BASE_URL=http://localhost:3000
|
NEXT_PUBLIC_BASE_URL=http://localhost:3000
|
||||||
NEXTAUTH_URL=$NEXT_PUBLIC_BASE_URL
|
|
||||||
|
|
||||||
# A connection string to your Postgres database
|
# 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
|
# Required to be able to send emails
|
||||||
SUPPORT_EMAIL=support@rallly.co
|
SUPPORT_EMAIL=support@rallly.co
|
||||||
|
|
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
|
@ -90,12 +90,11 @@ jobs:
|
||||||
- name: Create production build
|
- name: Create production build
|
||||||
run: yarn turbo build:test --filter=@rallly/web
|
run: yarn turbo build:test --filter=@rallly/web
|
||||||
|
|
||||||
- name: Generate Prisma Client
|
- name: Start services
|
||||||
run: yarn db:generate
|
run: yarn docker:up
|
||||||
|
|
||||||
- name: Set up database
|
- name: Setup database
|
||||||
run: |
|
run: yarn db:deploy
|
||||||
yarn dx
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: yarn test:integration
|
run: yarn test:integration
|
||||||
|
|
27
README.md
27
README.md
|
@ -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.
|
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
|
```bash
|
||||||
git clone https://github.com/lukevella/rallly.git
|
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
|
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
|
```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:
|
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
|
- seed the database with test users and random data
|
||||||
|
|
||||||
5. Start the Next.js server
|
5. Start the Next.js server
|
||||||
|
|
|
@ -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.
|
This email will be shown as the contact email for support queries.
|
||||||
</ParamField>
|
</ParamField>
|
||||||
|
|
||||||
<ParamField path="SMTP_HOST" required>
|
<ParamField path="SMTP_HOST">The host address of your SMTP server</ParamField>
|
||||||
The host address of your SMTP server
|
|
||||||
</ParamField>
|
|
||||||
|
|
||||||
<ParamField path="SMTP_PORT" default="25 or 465">
|
<ParamField path="SMTP_PORT" default="25 or 465">
|
||||||
The port of your SMTP server
|
The port of your SMTP server
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "3.7.0",
|
"version": "3.7.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dx": "run-s docker:up db:setup",
|
|
||||||
"dev": "dotenv -c development -- turbo dev --filter=@rallly/web",
|
"dev": "dotenv -c development -- turbo dev --filter=@rallly/web",
|
||||||
"dev:emails": "turbo dev --filter=@rallly/emails",
|
"dev:emails": "turbo dev --filter=@rallly/emails",
|
||||||
"dev:landing": "dotenv -c development turbo dev --filter=@rallly/landing",
|
"dev:landing": "dotenv -c development turbo dev --filter=@rallly/landing",
|
||||||
|
@ -15,10 +14,8 @@
|
||||||
"db:generate": "turbo db:generate",
|
"db:generate": "turbo db:generate",
|
||||||
"db:migrate": "prisma migrate dev",
|
"db:migrate": "prisma migrate dev",
|
||||||
"db:reset": "prisma migrate reset",
|
"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: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",
|
"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:integration": "turbo test:integration",
|
||||||
"test:unit": "turbo test:unit",
|
"test:unit": "turbo test:unit",
|
||||||
"lint": "turbo lint",
|
"lint": "turbo lint",
|
||||||
|
|
33
sample.env
33
sample.env
|
@ -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=
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"test:integration": {
|
"test:integration": {
|
||||||
|
"dependsOn": ["@rallly/database#db:generate"],
|
||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"db:generate": {
|
"db:generate": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue