2
0

chore: 🗑️ Tidy up env files

This commit is contained in:
Baptiste Arnaud
2022-02-10 17:13:57 +01:00
parent 19f4fdb83a
commit 901e2f39b0
8 changed files with 20 additions and 9 deletions

View File

@ -1,6 +1,6 @@
DATABASE_URL=postgresql://username:password@host:5450/typebot?schema=public
DATABASE_URL=postgresql://postgres:@localhost:5432/typebot
SECRET=q3t6v9y$B&E)H@McQfTjWnZr4u7x!z%C # 256-bits secret (can be generated here: https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx)
SECRET=q3t6v9y$B&E)H@McQfTjWnZr4u7x!z%C #256-bits secret (can be generated here: https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx)
NEXTAUTH_URL=http://localhost:3000
# Used for email auth and email notifications
@ -47,3 +47,5 @@ STRIPE_WEBHOOK_SECRET=
# (Optional) Used for GIF search
NEXT_PUBLIC_GIPHY_API_KEY=
NEXT_PUBLIC_VIEWER_HOST=http://localhost:3001

View File

@ -61,8 +61,12 @@ module.exports = withBundleAnalyzer({
],
fallback: [
{
source: '/:user*',
destination: process.env.NEXT_PUBLIC_VIEWER_HOST + '/:user*',
source: '/:typebotId*',
destination: process.env.NEXT_PUBLIC_VIEWER_HOST + '/:typebotId*',
},
{
source: '/api/:path*',
destination: process.env.NEXT_PUBLIC_VIEWER_HOST + '/api/:path*',
},
],
}

View File

@ -1,5 +1,5 @@
{
"name": "typebot.io",
"name": "landing-page",
"version": "1.0.0",
"scripts": {
"dev": "next dev -p 3002",

View File

@ -0,0 +1,3 @@
NEXT_PUBLIC_VIEWER_HOST=http://localhost:3001
DATABASE_URL=postgresql://postgres:@localhost:5432/typebot

View File

@ -8,7 +8,8 @@ services:
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ""
POSTGRES_DB: 'typebot'
POSTGRES_PASSWORD: ''
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
db_data:

View File

@ -9,8 +9,8 @@
"scripts": {
"docker:up": "docker-compose up -d",
"db:nuke": "docker-compose down --volumes --remove-orphans",
"dev": "dotenv -e .env yarn docker:up && dotenv -e .env turbo run dev --parallel",
"build": "dotenv -e .env turbo run build",
"dev": "yarn docker:up && turbo run dev --parallel",
"build": "yarn docker:up && turbo run build",
"test:builder": "cd apps/builder && yarn test",
"lint": "turbo run lint"
},

1
packages/db/.env.example Normal file
View File

@ -0,0 +1 @@
DATABASE_URL=postgresql://postgres:@localhost:5432/typebot

View File

@ -13,7 +13,7 @@
"@prisma/client": "^3.8.1"
},
"scripts": {
"dev": "yarn prisma db push && BROWSER=none yarn prisma studio",
"dev": "dotenv -e .env yarn prisma db push && BROWSER=none yarn prisma studio",
"build": "yarn migration:push",
"migration:push": "dotenv -e ../../.env yarn prisma db push",
"migration:create": "dotenv -e ../../.env yarn prisma migrate dev",