-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link new UI to auth and backend #36
Changes from 6 commits
2aacc54
477dd84
6d00653
925b51d
8e1c280
29246cf
2eda464
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 | ||
|
@@ -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 | ||
|
@@ -26,3 +44,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: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is the mail server needed just for the custom auth or also for the discord auth workflow? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes it's just for the custom auth. I'll enhance the comment in the next PR. |
||
image: maildev/maildev | ||
restart: always | ||
environment: | ||
- MAILDEV_WEB_PORT=1080 | ||
- MAILDEV_SMTP_PORT=1025 | ||
ports: | ||
- "1080:1080" | ||
- "1025:1025" |
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 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,6 @@ yarn-error.log* | |
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env | ||
.env*.local | ||
|
||
# vercel | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was intentionally dropping
extends
here to improve readability rather than reduce code. I especially wanted to expose the port and user/password details since they're used below.That for me at least makes it a little easier to see everything happening without having to check another docker compose file.