mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 02:10:12 -06:00
fix: update readme and env files to fix deployment issues
This commit is contained in:
9
.env.example
Normal file
9
.env.example
Normal file
@@ -0,0 +1,9 @@
|
||||
# Modify this variables according to your setup and needs
|
||||
SECRET=RANDOM_STRING
|
||||
DATABASE_URL='postgresql://user@localhost:5432/snoopforms?schema=public'
|
||||
NEXTAUTH_URL=http://localhost:3000
|
||||
ADMIN_EMAIL=user@example.com
|
||||
ADMIN_PASSWORD='admin123'
|
||||
|
||||
# For Docker Setup use this Database URL:
|
||||
# DATABASE_URL='postgresql://postgres:postgres@postgres:5432/snoopforms?schema=public'
|
||||
@@ -1,5 +0,0 @@
|
||||
SECRET=RANDOM_STRING
|
||||
DATABASE_URL='postgresql://user@localhost:5432/snoopforms?schema=public'
|
||||
NEXTAUTH_URL=http://localhost:3000
|
||||
ADMIN_EMAIL=user@example.com
|
||||
ADMIN_PASSWORD='admin123'
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -26,6 +26,7 @@ yarn-error.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# local env files
|
||||
.env
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
|
||||
35
README.md
35
README.md
@@ -47,7 +47,7 @@ Spin up forms in minutes. Pipe your data exactly where you need it. Maximize you
|
||||
|
||||
To get the project running locally on your machine you need to have the following development tools installed:
|
||||
|
||||
- Node.JS
|
||||
- Node.JS (we recommend v16)
|
||||
- Yarn
|
||||
- PostgreSQL
|
||||
|
||||
@@ -63,22 +63,32 @@ git clone https://github.com/snoopForms/snoopforms.git && cd snoopforms
|
||||
yarn install
|
||||
```
|
||||
|
||||
3. Create a `.env.local` file based on `.env.local.example` and change it according to your setup. Make sure the `DATABASE_URL` variable is set correctly according to your local database. You must also set the email variables to valid SMTP-credentials for the login to work.
|
||||
1. Create a `.env` file based on `.env.example` and change it according to your setup. Make sure the `DATABASE_URL` variable is set correctly according to your local database. You must also set the email variables to valid SMTP-credentials for the login to work.
|
||||
|
||||
````
|
||||
cp .env.example .env
|
||||
```
|
||||
Use an editor of your choice to edit the file (we use nano):
|
||||
````
|
||||
|
||||
nano .env
|
||||
|
||||
```
|
||||
cp .env.local.example .env.local && nano .env.local
|
||||
```
|
||||
|
||||
4. Let prisma set up the database for you:
|
||||
1. Make sure your PostgreSQL Database Server is running. Then let prisma set up the database for you:
|
||||
|
||||
```
|
||||
|
||||
npx prisma db push
|
||||
|
||||
```
|
||||
|
||||
5. Start the development server:
|
||||
|
||||
```
|
||||
|
||||
yarn dev
|
||||
|
||||
```
|
||||
|
||||
You can now access the app on [https://localhost:3000](https://localhost:3000)
|
||||
@@ -90,19 +100,25 @@ The easiest way to deploy snoopForms yourself on your own machine is using Docke
|
||||
Clone the repository:
|
||||
|
||||
```
|
||||
|
||||
git clone https://github.com/snoopForms/snoopforms.git && cd snoopforms
|
||||
```
|
||||
|
||||
Create a `.env.local` file based on `.env.local.example` and change it according to your setup. You must set the email variables to valid SMTP-credentials for the login to work:
|
||||
|
||||
```
|
||||
cp .env.local.example .env.local && nano .env.local
|
||||
|
||||
Create a `.env` file based on `.env.example` and change it according to your setup. You must set the email variables to valid SMTP-credentials for the login to work:
|
||||
|
||||
```
|
||||
|
||||
cp .env.example .env && nano .env
|
||||
|
||||
```
|
||||
|
||||
Start the docker-compose process to build and spin up the snoopForms container as well as the postgres database.
|
||||
|
||||
```
|
||||
|
||||
docker-compose up -d
|
||||
|
||||
```
|
||||
|
||||
You can now access the app on [https://localhost:3000](https://localhost:3000)
|
||||
@@ -121,3 +137,4 @@ Contributions are what make the open source community such an amazing place to b
|
||||
## License
|
||||
|
||||
Distributed under the AGPLv3 License. See `LICENSE` for more information.
|
||||
```
|
||||
|
||||
@@ -15,7 +15,7 @@ services:
|
||||
ports:
|
||||
- 3000:3000
|
||||
env_file:
|
||||
- .env.local
|
||||
- .env
|
||||
|
||||
volumes:
|
||||
postgres:
|
||||
|
||||
Reference in New Issue
Block a user