Skip to content

Commit

Permalink
Merge pull request #36 from LAION-AI/web-link-newui-to-backend
Browse files Browse the repository at this point in the history
Link new UI to auth and backend
  • Loading branch information
fozziethebeat committed Dec 20, 2022
2 parents aa26c4a + 2eda464 commit 2dbdd92
Show file tree
Hide file tree
Showing 21 changed files with 7,676 additions and 3,565 deletions.
30 changes: 30 additions & 0 deletions scripts/frontend-development/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: "3.7"

services:
# This DB is for the FastAPI Backend.
db:
extends:
file: ../backend-development/docker-compose.yaml
Expand All @@ -10,6 +11,23 @@ services:
interval: 2s
timeout: 2s
retries: 10

# This DB is for Web Authentication and data caching.
webdb:
image: postgres
restart: always
ports:
- 5433:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 2s
timeout: 2s
retries: 10

# This lets you manually inspect the web and backend databases.
adminer:
extends:
file: ../backend-development/docker-compose.yaml
Expand All @@ -28,3 +46,15 @@ services:
condition: service_healthy
ports:
- "8080:8080"

# This fakes and SMTP email server. User registration emails can be found by going to
# localhost:1080 and opening the emails listed.
maildev:
image: maildev/maildev
restart: always
environment:
- MAILDEV_WEB_PORT=1080
- MAILDEV_SMTP_PORT=1025
ports:
- "1080:1080"
- "1025:1025"
14 changes: 14 additions & 0 deletions website/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# The database created by running the jobs in /scripts/frontend-development/docker-compose.yaml
DATABASE_URL=postgres://postgres:postgres@localhost:5433/ocgpt_website

# The FastAPI backend found by running the jobs in /scripts/frontend-development/docker-compose.yaml
FASTAPI_URL=http://localhost:8080
FASTAPI_KEY=1234

# A dev Auth Secret. Can be exposed if we never use this publically.
NEXTAUTH_SECRET=O/M2uIbGj+lDD2oyNa8ax4jEOJqCPJzO53UbWShmq98=

# The SMTP host and port found by running the jobs in /scripts/frontend-development/docker-compose.yaml
EMAIL_SERVER_HOST=localhost
EMAIL_SERVER_PORT=1025
EMAIL_FROM=info@example.com
8 changes: 0 additions & 8 deletions website/.env.example

This file was deleted.

1 change: 0 additions & 1 deletion website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ yarn-error.log*
.pnpm-debug.log*

# local env files
.env
.env*.local

# vercel
Expand Down

0 comments on commit 2dbdd92

Please sign in to comment.