File tree Expand file tree Collapse file tree 3 files changed +20
-7
lines changed
Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -64,18 +64,18 @@ git clone https://github.com/uwblueprint/llsc.git
6464cd llsc
6565```
6666
67- - Create a .env file in the root directory based on the .env.sample file. Update
67+ - Create a .env file in ` ./backend ` and ` ./frontend ` based on the .env.sample file. Update
6868 the environment variables as needed. Consult the [ Secrets] ( #secrets ) section
6969 for detailed instructions.
7070
7171``` bash
7272cp .env.sample .env
7373```
7474
75- - Build and start the Docker containers
75+ - Build and start the Docker containers (in detached mode)
7676
7777``` bash
78- docker-compose up --build
78+ docker-compose up -d
7979```
8080
8181- Install pdm (this is a global installation, so location doesn't matter)
@@ -85,6 +85,14 @@ brew install pdm
8585```
8686Otherwise, feel free to follow install instructions [ here] ( https://pdm-project.org/latest/#installation )
8787
88+ - Install postgresql (this is for local development)
89+ On macOS:
90+ ``` bash
91+ brew install postgresql
92+ ```
93+ Otherwise, feel free to follow install instructions [ here] ( https://www.postgresql.org/download/ )
94+ Note: you will need this for ` psycopg2 ` , which requires a config file that is part of postgresql.
95+
8896You will then need to go into each directory individually to install dependencies.
8997
9098FastAPI backend
Original file line number Diff line number Diff line change 22from contextlib import asynccontextmanager
33from typing import Union
44
5+ from backend .app .routes import send_email
6+ from dotenv import load_dotenv
57from fastapi import FastAPI
68
7- from . import models
8- from .routes import send_email , user
9+ load_dotenv ()
10+
11+ # we need to load env variables before initialization code runs
12+ from . import models # noqa: E402
13+ from .routes import user # noqa: E402
914from .utilities .constants import LOGGER_NAME
10- from .utilities .firebase_init import initialize_firebase
15+ from .utilities .firebase_init import initialize_firebase # noqa: E402
1116
1217log = logging .getLogger (LOGGER_NAME ("server" ))
1318
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ services:
3636 POSTGRES_PASSWORD : ${POSTGRES_PASSWORD}
3737 POSTGRES_DB : ${POSTGRES_DATABASE}
3838 healthcheck :
39- test : ["CMD-SHELL", "pg_isready -U postgres "]
39+ test : ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} "]
4040 interval : 5s
4141 timeout : 5s
4242 retries : 5
You can’t perform that action at this time.
0 commit comments