Skip to content

Commit

Permalink
Merge pull request #6 from kristo-baricevic/listOfMed
Browse files Browse the repository at this point in the history
List of med
  • Loading branch information
kristo-baricevic authored Feb 23, 2024
2 parents f5705b4 + 77a4b3b commit 72cbf83
Show file tree
Hide file tree
Showing 41 changed files with 731 additions and 412 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/containers-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<<<<<<< HEAD
name: 'Containers: Publish'

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

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

permissions:
packages: write
Expand All @@ -12,6 +20,7 @@ jobs:
name: Build and Push
runs-on: ubuntu-latest
steps:
<<<<<<< HEAD

- uses: actions/checkout@v3

Expand Down Expand Up @@ -52,6 +61,47 @@ jobs:

- 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'
Expand All @@ -66,5 +116,10 @@ jobs:
# - 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
17 changes: 17 additions & 0 deletions .github/workflows/release-prepare.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
<<<<<<< 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:
Expand All @@ -18,3 +27,11 @@ jobs:
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
17 changes: 17 additions & 0 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
name: 'Release: Publish PR'

on:
Expand All @@ -14,3 +15,19 @@ jobs:
- 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
17 changes: 17 additions & 0 deletions .github/workflows/release-validate.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
name: 'Release: Validate PR'

on:
Expand All @@ -14,3 +15,19 @@ jobs:
- 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
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
# Welcome
# Balancer

## Start project

1) You will need to clone the repos.
2) Start docker desktop
3) Type in terminal Docker-Compose up --build

Reach out to Tai to get API key for ChatGPT.

## Current Draft

You can view the current [build of the website here](https://balancertestsite.com).

![image](https://github.com/CodeForPhilly/balancer-main/assets/26842253/fb9691ff-6f49-4b62-903e-971c19fa1c3e)

![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/).

## Project Updates


## Current Tasks


## Languages/Frameworks


## Contribution

You've reached the CodeForPhilly balancer project (https://opencollective.com/code-for-philly/projects/balancer).

## Backend Development Setup

Rename env.dev inside of config/env to .env.dev

docker-compose build

docker-compose up
13 changes: 13 additions & 0 deletions config/env/env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DEBUG=1
SECRET_KEY=foo
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
SQL_ENGINE=django.db.backends.postgresql
SQL_DATABASE=balancer_dev
SQL_USER=balancer
SQL_PASSWORD=balancer
SQL_HOST=db
SQL_PORT=5432
DATABASE=postgres
LOGIN_REDIRECT_URL=
OPENAI_API_KEY=
PINECONE_API_KEY=
6 changes: 4 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ services:
- POSTGRES_USER=balancer
- POSTGRES_PASSWORD=balancer
- POSTGRES_DB=balancer_dev
ports:
- "5432:5432"
backend:
image: balancer-backend
build: ./server
Expand All @@ -32,10 +34,10 @@ services:
- IMAGE_NAME=balancer-frontend
- FRONTEND_VERSION=0.0.1
ports:
- "3001:3001"
- "3000:3000"
environment:
- CHOKIDAR_USEPOLLING=true
- VITE_API_BASE_URL=https://balancertestsite.com/
# - VITE_API_BASE_URL=https://balancertestsite.com/
volumes:
- "./frontend:/usr/src/app:delegated"
- "/usr/src/app/node_modules/"
Expand Down
1 change: 1 addition & 0 deletions frontend/.env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# VITE_API_BASE_URL=https://balancertestsite.com/
VITE_API_BASE_URL=http://localhost:8000
49 changes: 24 additions & 25 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
href="https://api.fontshare.com/v2/css?f[]=satoshi@1,900,700,500,300,400&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=DM+Mono:ital@0;1&family=Lora:wght@700&display=swap"
rel="stylesheet"
/>
<title>Balancer - A Tool To Assist</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/Main.tsx"></script>
</body>
</html>

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://api.fontshare.com/v2/css?f[]=satoshi@1,900,700,500,300,400&display=swap" rel="stylesheet" />
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=DM+Mono:ital@0;1&family=Lora:wght@700&display=swap"
rel="stylesheet" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Quicksand:[email protected]&display=swap" rel="stylesheet">
<title>Balancer - A Tool To Assist</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/Main.tsx"></script>
</body>

</html>
9 changes: 9 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"formik": "^2.4.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^5.0.1",
"react-query": "^3.39.3",
"react-redux": "^8.0.7",
"react-router": "^6.14.0",
Expand Down
Loading

0 comments on commit 72cbf83

Please sign in to comment.