Skip to content

Commit

Permalink
Merge branch 'listOfMed' of https://github.com/CodeForPhilly/balancer…
Browse files Browse the repository at this point in the history
  • Loading branch information
kristo-baricevic committed Mar 12, 2024
2 parents 94c2f0c + d7ff4cf commit 67d692a
Show file tree
Hide file tree
Showing 32 changed files with 565 additions and 214 deletions.
16 changes: 4 additions & 12 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# This image runs the production server, with nginx
###########
# BUILDER #
###########

# pull official base image
FROM python:3.11.4-slim-buster as python_builder
FROM python:3.11.4-slim-buster as builder

# set work directory
WORKDIR /usr/src/app
Expand Down Expand Up @@ -49,8 +48,8 @@ WORKDIR $APP_HOME

# install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends netcat
COPY --from=python_builder /usr/src/app/wheels /wheels
COPY --from=python_builder /usr/src/app/requirements.txt .
COPY --from=builder /usr/src/app/wheels /wheels
COPY --from=builder /usr/src/app/requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache /wheels/*

Expand All @@ -69,11 +68,4 @@ RUN chown -R app:app $APP_HOME
USER app

# run entrypoint.prod.sh
<<<<<<< HEAD:Dockerfile.prod
ENTRYPOINT ["/home/app/web/entrypoint.prod.sh"]


# TODO: gunicorn stuff
=======
ENTRYPOINT ["/home/app/web/entrypoint.prod.sh"]
>>>>>>> ac68347c12ced724206112843623ee8c515bd3ad:server/Dockerfile.prod
ENTRYPOINT ["/home/app/web/entrypoint.prod.sh"]
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,29 @@ You can view the current [build of the website here](https://balancertestsite.co

![image](https://github.com/CodeForPhilly/balancer-main/assets/26842253/92c5d6e3-2aaf-4d28-9095-0ea22fa87791)

Likewise, you can view the very first iteration [build of the website here](https://64861cae18fa9449694ad5ef--deft-tapioca-dd7777.netlify.app/).
Likewise, you can view the first iteration [build of the website here](https://64861cae18fa9449694ad5ef--deft-tapioca-dd7777.netlify.app/).

## Project Updates
[Release V1.02272024]

1) Updated Help Page. Thank you @kristo_baricevic
2) Make 'Contact us' a mailto link. Thank you @greggaleg
3) Improve Chat Response Formatting in UI. Thank you @greggaleg


## Current Tasks

1) Official Deployment System: @joshgerstein.
2) Prompt Creations: @erinc.
3) Additional Business Logic for New Patient Form: @tomdoan.
4) Backend for Feedback Form: @dattali.
5) Redesign of AI Architecture.
6) Add logging to the backend for debugging.
7) Documentations of Forking and merging branches.

## Languages/Frameworks

Django, React, PostGres

## Contribution

Expand Down
8 changes: 5 additions & 3 deletions config/env/env.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DEBUG=1
DEBUG=True
SECRET_KEY=foo
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
SQL_ENGINE=django.db.backends.postgresql
Expand All @@ -9,5 +9,7 @@ SQL_HOST=db
SQL_PORT=5432
DATABASE=postgres
LOGIN_REDIRECT_URL=
OPENAI_API_KEY=
PINECONE_API_KEY=
OPENAI_API_KEY=
PINECONE_API_KEY=
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
4 changes: 3 additions & 1 deletion config/env/env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ SQL_PASSWORD=set_me
SQL_HOST=db
SQL_PORT=5432
DATABASE=postgres
LOGIN_REDIRECT_URL=
LOGIN_REDIRECT_URL=
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
39 changes: 24 additions & 15 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,40 @@ services:
image: postgres:15
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
<<<<<<< HEAD
- ./config/env/env.prod.db
=======
- ./config/env/.env.prod.db
>>>>>>> ac68347c12ced724206112843623ee8c515bd3ad
environment:
- POSTGRES_USER=balancer
- POSTGRES_PASSWORD=balancer
- POSTGRES_DB=balancer_dev
ports:
- "5432:5432"
backend:
build:
context: ./server
dockerfile: Dockerfile.prod
command: gunicorn balancer_backend.wsgi:application --bind 0.0.0.0:8000
image: balancer-backend
build:
context: server
dockerfile: Dockerfile.prod
ports:
- 8000:8000
- "8000:8000"
env_file:
- ./config/env/env.prod
- ./config/env/env.dev
depends_on:
- db
<<<<<<< HEAD
=======
frontend:
image: balancer-frontend
build:
context: ./frontend
dockerfile: Dockerfile.prod
context: frontend
dockerfile: Dockerfile
args:
- IMAGE_NAME=balancer-frontend
ports:
- "3000:80"
- "3000:3000"
environment:
- CHOKIDAR_USEPOLLING=true
# - VITE_API_BASE_URL=https://balancertestsite.com/
volumes:
- "./frontend:/usr/src/app:delegated"
- "/usr/src/app/node_modules/"
depends_on:
- backend
>>>>>>> ac68347c12ced724206112843623ee8c515bd3ad
Expand Down
30 changes: 30 additions & 0 deletions docker-compose.prodBackup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: '3.8'
services:
db:
image: postgres:15
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./config/env/.env.prod.db
backend:
build:
context: ./server
dockerfile: Dockerfile.prod
command: gunicorn balancer_backend.wsgi:application --bind 0.0.0.0:8000
ports:
- 8000:8000
env_file:
- ./config/env/.env.prod
depends_on:
- db
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.prod
ports:
- "3000:80"
depends_on:
- backend

volumes:
postgres_data:
Loading

0 comments on commit 67d692a

Please sign in to comment.