Skip to content
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

Help page #122

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
0cdf3c3
change docker setup
Tom-from-6520 Mar 13, 2024
fd26fe1
change outdated front end library
Tom-from-6520 Mar 13, 2024
5b81b6d
add frontend interface that return all info to backend
Tom-from-6520 Mar 13, 2024
7c825f4
add dockerfile changes
Tom-from-6520 Mar 13, 2024
156a480
normalize database schema, populate database with new data, and chang…
Tom-from-6520 Mar 13, 2024
e6d3205
merge conflicts
Tom-from-6520 Mar 13, 2024
11a82b8
add guardrail for the case the DB is already initiated
Tom-from-6520 Mar 19, 2024
7dfac7f
change how risks and benefits is queried from the DB instead of from …
Tom-from-6520 Mar 19, 2024
c797690
Merge branch 'CodeForPhilly:listOfMed' into feature/refactor-db-schema
Tom-from-6520 Mar 19, 2024
5995103
Merge branch 'CodeForPhilly:listOfMed' into feature/refactor-db-schema
Tom-from-6520 Mar 28, 2024
cf004e9
add guardrail to prevent populate an existing db
Tom-from-6520 Mar 28, 2024
56c664a
update logic for medication recommendation
Tom-from-6520 Mar 28, 2024
48d9bc3
Merge pull request #108 from Tom-from-6520/feature/refactor-db-schema
taichan03 Mar 30, 2024
352a9d9
style: Responsive alignment to welcome header; update alignment of pa…
StubberG3 Mar 30, 2024
607b731
fix: Resolve semantic HTML console.errors in PatientSummary
StubberG3 Mar 30, 2024
9fdec4b
fix migrations
taichan03 Mar 30, 2024
86962ba
entrypoint.production update to only migrate
taichan03 Mar 31, 2024
2308c00
fix: Re-add "desc1" class to react elements sent in welcome descripti…
StubberG3 Mar 31, 2024
fbfffdb
fix: Re-add "desc1" class to react elements sent in welcome descripti…
StubberG3 Mar 31, 2024
9f5383e
style: Swap bold with underline class to be consistent with other lin…
StubberG3 Mar 31, 2024
f5c91ec
Merge branch 'CodeForPhilly:listOfMed' into listOfMed
StubberG3 Mar 31, 2024
832213f
Merge branch 'listOfMed' of https://github.com/StubberG3/balancer-mai…
StubberG3 Mar 31, 2024
2f183ae
Merge branch 'listOfMed' of https://github.com/StubberG3/balancer-mai…
StubberG3 Mar 31, 2024
7db1278
fix: Add desc1 class to custom heading description
StubberG3 Mar 31, 2024
d271e58
Swap tabs with spaces for consistency
StubberG3 Mar 31, 2024
2c7c3d3
fix: Swap let with const per eslint
StubberG3 Mar 31, 2024
4e9959b
style: Swap bold with underline to be consistent with other link styling
StubberG3 Mar 31, 2024
c75eaec
Merge branch 'listOfMed' of https://github.com/StubberG3/balancer-mai…
StubberG3 Mar 31, 2024
3595e60
Merge pull request #118 from StubberG3/listOfMed
taichan03 Mar 31, 2024
2a2ade3
hotfix for weightgainconcern component
Tom-from-6520 Mar 31, 2024
f7121cc
Merge branch 'CodeForPhilly:listOfMed' into feature/refactor-db-schema
Tom-from-6520 Mar 31, 2024
f3353f2
take off state history
taichan03 Mar 31, 2024
5d9968a
Merge pull request #119 from Tom-from-6520/feature/refactor-db-schema
taichan03 Mar 31, 2024
4e0819f
push
kristo-baricevic Apr 12, 2024
c426c69
Merge branch 'help-page' of https://github.com/kristo-baricevic/balan…
kristo-baricevic Apr 12, 2024
ed6eddb
idk
kristo-baricevic Apr 12, 2024
b6ea4cc
Merge branch '116-frontend-add-unit-testing-for-frontend' into help-page
kristo-baricevic Apr 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 0 additions & 125 deletions .github/workflows/containers-publish.yml
Original file line number Diff line number Diff line change
@@ -1,125 +0,0 @@
<<<<<<< HEAD
name: 'Containers: Publish'

on:
push:
tags: [ 'v*' ]
=======
name: "Containers: Publish"

on:
push:
tags: ["v*"]
>>>>>>> afb000d3a3ee90a677a2580d82fe3a432d1c1933

permissions:
packages: write

jobs:
release-containers:
name: Build and Push
runs-on: ubuntu-latest
steps:
<<<<<<< HEAD

- uses: actions/checkout@v3

- name: Login to ghcr.io Docker registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Compute Docker container image addresses
run: |
DOCKER_REPOSITORY="ghcr.io/${GITHUB_REPOSITORY,,}"
DOCKER_TAG="${GITHUB_REF:11}"

echo "DOCKER_REPOSITORY=${DOCKER_REPOSITORY}" >> $GITHUB_ENV
echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV

echo "Using: ${DOCKER_REPOSITORY}/*:${DOCKER_TAG}"

# - name: 'Pull previous Docker container image: :latest'
# run: docker pull "${DOCKER_REPOSITORY}:latest" || true

- name: 'Pull previous Docker container image: frontend-static:latest'
run: docker pull "${DOCKER_REPOSITORY}/frontend-static:latest" || true

- name: 'Build Docker container image: frontend-static:latest'
run: |
docker build \
--cache-from "${DOCKER_REPOSITORY}/frontend-static:latest" \
--file frontend/Dockerfile.demo \
--build-arg SERVER_NAME=localhost \
--tag "${DOCKER_REPOSITORY}/frontend-static:latest" \
--tag "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}" \
frontend
- name: 'Push Docker container image frontend-static:latest'
run: docker push "${DOCKER_REPOSITORY}/frontend-static:latest"

- name: 'Push Docker container image frontend-static:v*'
run: docker push "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}"
=======
- uses: actions/checkout@v3

- name: Login to ghcr.io Docker registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Compute Docker container image addresses
run: |
DOCKER_REPOSITORY="ghcr.io/${GITHUB_REPOSITORY,,}"
DOCKER_TAG="${GITHUB_REF:11}"

echo "DOCKER_REPOSITORY=${DOCKER_REPOSITORY}" >> $GITHUB_ENV
echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV

echo "Using: ${DOCKER_REPOSITORY}/*:${DOCKER_TAG}"

# - name: 'Pull previous Docker container image: :latest'
# run: docker pull "${DOCKER_REPOSITORY}:latest" || true

- name: "Pull previous Docker container image: frontend-static:latest"
run: docker pull "${DOCKER_REPOSITORY}/frontend-static:latest" || true

- name: "Build Docker container image: frontend-static:latest"
run: |
docker build \
--cache-from "${DOCKER_REPOSITORY}/frontend-static:latest" \
--file frontend/Dockerfile.demo \
--build-arg SERVER_NAME=localhost \
--tag "${DOCKER_REPOSITORY}/frontend-static:latest" \
--tag "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}" \
frontend
- name: "Push Docker container image frontend-static:latest"
run: docker push "${DOCKER_REPOSITORY}/frontend-static:latest"

- name: "Push Docker container image frontend-static:v*"
run: docker push "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}"
>>>>>>> afb000d3a3ee90a677a2580d82fe3a432d1c1933
#
#
# - name: 'Build Docker container image: backend:latest'
# run: |
# cd backend && \
# make && \
# docker image tag "${DOCKER_REPOSITORY}/backend/local:latest" "${DOCKER_REPOSITORY}/backend:latest"
#
# - name: Push Docker container image backend:latest
# run: docker push "${DOCKER_REPOSITORY}/backend:latest"
#
# - name: Push Docker container image backend:v*
# run: docker push "${DOCKER_REPOSITORY}/backend:${DOCKER_TAG}"

<<<<<<< HEAD
# - name: Push Docker container image :v*"
# run: docker push "${DOCKER_REPOSITORY}:${DOCKER_TAG}"
=======
# - name: Push Docker container image :v*"
# run: docker push "${DOCKER_REPOSITORY}:${DOCKER_TAG}"
>>>>>>> afb000d3a3ee90a677a2580d82fe3a432d1c1933
37 changes: 0 additions & 37 deletions .github/workflows/release-prepare.yml
Original file line number Diff line number Diff line change
@@ -1,37 +0,0 @@
<<<<<<< HEAD
name: 'Release: Prepare PR'

on:
push:
branches: [ develop ]
=======
name: "Release: Prepare PR"

on:
push:
branches: [develop]
>>>>>>> afb000d3a3ee90a677a2580d82fe3a432d1c1933

permissions:
contents: read
pull-requests: write

jobs:
release-prepare:
<<<<<<< HEAD

runs-on: ubuntu-latest
steps:

- uses: JarvusInnovations/infra-components@channels/github-actions/release-prepare/latest
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release-branch: main
=======
runs-on: ubuntu-latest
steps:
- uses: JarvusInnovations/infra-components@channels/github-actions/release-prepare/latest
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release-branch: main
>>>>>>> afb000d3a3ee90a677a2580d82fe3a432d1c1933
33 changes: 0 additions & 33 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
@@ -1,33 +0,0 @@
<<<<<<< HEAD
name: 'Release: Publish PR'

on:
pull_request:
branches: [ main ]
types: [ closed ]

jobs:
release-publish:

runs-on: ubuntu-latest
steps:

- uses: JarvusInnovations/infra-components@channels/github-actions/release-publish/latest
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
=======
name: "Release: Publish PR"

on:
pull_request:
branches: [main]
types: [closed]

jobs:
release-publish:
runs-on: ubuntu-latest
steps:
- uses: JarvusInnovations/infra-components@channels/github-actions/release-publish/latest
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
>>>>>>> afb000d3a3ee90a677a2580d82fe3a432d1c1933
33 changes: 0 additions & 33 deletions .github/workflows/release-validate.yml
Original file line number Diff line number Diff line change
@@ -1,33 +0,0 @@
<<<<<<< HEAD
name: 'Release: Validate PR'

on:
pull_request:
branches: [ main ]
types: [ opened, edited, reopened, synchronize ]

jobs:
release-validate:

runs-on: ubuntu-latest
steps:

- uses: JarvusInnovations/infra-components@channels/github-actions/release-validate/latest
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
=======
name: "Release: Validate PR"

on:
pull_request:
branches: [main]
types: [opened, edited, reopened, synchronize]

jobs:
release-validate:
runs-on: ubuntu-latest
steps:
- uses: JarvusInnovations/infra-components@channels/github-actions/release-validate/latest
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
>>>>>>> afb000d3a3ee90a677a2580d82fe3a432d1c1933
71 changes: 0 additions & 71 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,71 +0,0 @@
###########
# BUILDER #
###########

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

# set work directory
WORKDIR /usr/src/app

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

# install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc

# lint
# RUN pip install --upgrade pip
# RUN pip install flake8==6.0.0
# COPY . /usr/src/app/
# RUN flake8 --ignore=E501,F401 .

# install python dependencies
COPY ./requirements.txt .
RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels -r requirements.txt


#########
# FINAL #
#########

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

# create directory for the app user
RUN mkdir -p /home/app

# create the app user
RUN addgroup --system app && adduser --system --group app

# create the appropriate directories
ENV HOME=/home/app
ENV APP_HOME=/home/app/web
RUN mkdir $APP_HOME
WORKDIR $APP_HOME

# install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends netcat
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/*

# copy entrypoint.prod.sh
COPY ./entrypoint.prod.sh .
RUN sed -i 's/\r$//g' $APP_HOME/entrypoint.prod.sh
RUN chmod +x $APP_HOME/entrypoint.prod.sh

# copy project
COPY . $APP_HOME

# chown all the files to the app user
RUN chown -R app:app $APP_HOME

# change to the app user
USER app

# run entrypoint.prod.sh
ENTRYPOINT ["/home/app/web/entrypoint.prod.sh"]
74 changes: 0 additions & 74 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1 @@
version: '3.8'
services:
db:
image: postgres:15
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=balancer
- POSTGRES_PASSWORD=balancer
- POSTGRES_DB=balancer_dev
ports:
- "5432:5432"
networks:
app_net:
ipv4_address: 192.168.0.2
pgadmin:
container_name: pgadmin4
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: balancer
# PGADMIN_LISTEN_PORT = 80
# volumes:
# - ./pgadmin-data:/var/lib/pgadmin
# # PGADMIN_LISTEN_PORT = 80
ports:
- "5050:80"
networks:
app_net:
ipv4_address: 192.168.0.3
backend:
image: balancer-backend
build: ./server
command: python manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
env_file:
- ./config/env/env.dev
depends_on:
- db
volumes:
- ./server:/usr/src/server
networks:
app_net:
ipv4_address: 192.168.0.4
frontend:
image: balancer-frontend
build:
context: frontend
dockerfile: Dockerfile
args:
- IMAGE_NAME=balancer-frontend
ports:
- "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
networks:
app_net:
ipv4_address: 192.168.0.5

volumes:
postgres_data:
networks:
app_net:
ipam:
driver: default
config:
- subnet: "192.168.0.0/24"
gateway: 192.168.0.1
Loading