From 947c504acbcfc07b66bd53b94e72a7aa97fc833b Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Tue, 14 Nov 2023 20:26:32 -0500 Subject: [PATCH 01/11] feat(ci): add automated release workflow --- .github/workflows/release-prepare.yml | 20 ++++++++++++++++++++ .github/workflows/release-publish.yml | 16 ++++++++++++++++ .github/workflows/release-validate.yml | 16 ++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 .github/workflows/release-prepare.yml create mode 100644 .github/workflows/release-publish.yml create mode 100644 .github/workflows/release-validate.yml diff --git a/.github/workflows/release-prepare.yml b/.github/workflows/release-prepare.yml new file mode 100644 index 00000000..0a34fe37 --- /dev/null +++ b/.github/workflows/release-prepare.yml @@ -0,0 +1,20 @@ +name: 'Release: Prepare PR' + +on: + push: + branches: [ develop ] + +permissions: + contents: read + pull-requests: write + +jobs: + release-prepare: + + runs-on: ubuntu-latest + steps: + + - uses: JarvusInnovations/infra-components@channels/github-actions/release-prepare/latest + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + release-branch: main diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml new file mode 100644 index 00000000..d65269ff --- /dev/null +++ b/.github/workflows/release-publish.yml @@ -0,0 +1,16 @@ +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 }} diff --git a/.github/workflows/release-validate.yml b/.github/workflows/release-validate.yml new file mode 100644 index 00000000..eaf9c583 --- /dev/null +++ b/.github/workflows/release-validate.yml @@ -0,0 +1,16 @@ +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 }} From 477c1f772ac50b93ef48d72934d2aaa96916b3ad Mon Sep 17 00:00:00 2001 From: Joshua Gerstein Date: Tue, 12 Dec 2023 15:13:45 -0500 Subject: [PATCH 02/11] Add helm chart (in project root) and files for static demo server --- .github/workflows/containers-publish.yml | 70 +++++++++++++++++++ server/Dockerfile.prod => Dockerfile.prod | 10 ++- docker-compose.yml => docker-compose.dev.yml | 5 +- docker-compose.prod.yml | 17 +---- frontend/.gitignore | 2 - frontend/Dockerfile.demo | 38 ++++++++++ frontend/{Dockerfile => Dockerfile.dev} | 9 +-- frontend/docker-compose.demo.yaml | 16 +++++ ...er-compose.yml => docker-compose.dev.yaml} | 7 +- frontend/nginx.conf.demo | 29 ++++++++ helm-chart/Chart.yaml | 9 +++ helm-chart/README.md | 2 + .../templates/frontend-static-deployment.yaml | 54 ++++++++++++++ .../templates/frontend-static-service.yaml | 19 +++++ helm-chart/templates/nginx-configmap.yaml | 45 ++++++++++++ helm-chart/values.yaml | 17 +++++ server/{Dockerfile => Dockerfile.dev} | 2 + 17 files changed, 322 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/containers-publish.yml rename server/Dockerfile.prod => Dockerfile.prod (85%) rename docker-compose.yml => docker-compose.dev.yml (87%) create mode 100644 frontend/Dockerfile.demo rename frontend/{Dockerfile => Dockerfile.dev} (68%) create mode 100644 frontend/docker-compose.demo.yaml rename frontend/{docker-compose.yml => docker-compose.dev.yaml} (51%) create mode 100644 frontend/nginx.conf.demo create mode 100644 helm-chart/Chart.yaml create mode 100644 helm-chart/README.md create mode 100644 helm-chart/templates/frontend-static-deployment.yaml create mode 100644 helm-chart/templates/frontend-static-service.yaml create mode 100644 helm-chart/templates/nginx-configmap.yaml create mode 100644 helm-chart/values.yaml rename server/{Dockerfile => Dockerfile.dev} (81%) diff --git a/.github/workflows/containers-publish.yml b/.github/workflows/containers-publish.yml new file mode 100644 index 00000000..5a06ec39 --- /dev/null +++ b/.github/workflows/containers-publish.yml @@ -0,0 +1,70 @@ +name: 'Containers: Publish' + +on: + workflow_dispatch +# push: +# tags: [ 'v*' ] + + +jobs: + release-containers: + name: Build and Push + runs-on: ubuntu-latest + steps: + + - 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:latest' + run: docker push "${DOCKER_REPOSITORY}/frontend-static:latest" + + - name: 'Push Docker container image frontend:v*' + run: docker push "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}" +# +# +# - 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}" + + # - name: Push Docker container image :v*" + # run: docker push "${DOCKER_REPOSITORY}:${DOCKER_TAG}" + \ No newline at end of file diff --git a/server/Dockerfile.prod b/Dockerfile.prod similarity index 85% rename from server/Dockerfile.prod rename to Dockerfile.prod index fe448bab..5b979a4e 100644 --- a/server/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,9 +1,10 @@ +# This image runs the production server, with nginx ########### # BUILDER # ########### # pull official base image -FROM python:3.11.4-slim-buster as builder +FROM python:3.11.4-slim-buster as python_builder # set work directory WORKDIR /usr/src/app @@ -48,8 +49,8 @@ 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 . +COPY --from=python_builder /usr/src/app/wheels /wheels +COPY --from=python_builder /usr/src/app/requirements.txt . RUN pip install --upgrade pip RUN pip install --no-cache /wheels/* @@ -69,3 +70,6 @@ USER app # run entrypoint.prod.sh ENTRYPOINT ["/home/app/web/entrypoint.prod.sh"] + + +# TODO: gunicorn stuff \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.dev.yml similarity index 87% rename from docker-compose.yml rename to docker-compose.dev.yml index 042f0073..67ab99f3 100644 --- a/docker-compose.yml +++ b/docker-compose.dev.yml @@ -12,7 +12,7 @@ services: build: ./server command: python manage.py runserver 0.0.0.0:8000 volumes: - - ./server:/usr/src/server + - ./server:/usr/src/app ports: - "8000:8000" env_file: @@ -23,9 +23,10 @@ services: image: balancer-frontend build: context: frontend - dockerfile: Dockerfile + dockerfile: Dockerfile.dev args: - IMAGE_NAME=balancer-frontend + - FRONTEND_VERSION=0.0.1 ports: - "3000:3000" environment: diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 2a7e43e8..a58e7700 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -5,7 +5,7 @@ services: volumes: - postgres_data:/var/lib/postgresql/data/ env_file: - - ./.env.prod.db + - ./config/env/env.prod.db backend: build: context: ./server @@ -14,22 +14,9 @@ services: ports: - 8000:8000 env_file: - - ./config/env/.env.prod + - ./config/env/env.prod depends_on: - db - frontend: - image: balancer-frontend - build: - context: frontend - dockerfile: Dockerfile - args: - - IMAGE_NAME=balancer-frontend - ports: - - "3000:3000" - environment: - - CHOKIDAR_USEPOLLING=true - depends_on: - - backend volumes: postgres_data: \ No newline at end of file diff --git a/frontend/.gitignore b/frontend/.gitignore index d67a573c..a547bf36 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -22,5 +22,3 @@ dist-ssr *.njsproj *.sln *.sw? - -.DS_Store diff --git a/frontend/Dockerfile.demo b/frontend/Dockerfile.demo new file mode 100644 index 00000000..ecf94591 --- /dev/null +++ b/frontend/Dockerfile.demo @@ -0,0 +1,38 @@ +# This dockerfile builds an image for a static frontend only server suitable for online hosting. +# Use the official Node.js image as the base image +FROM node:18 as builder + +# Set the working directory inside the container +WORKDIR /usr/src/app + +# Copy package.json and package-lock.json +COPY package*.json ./ + +# Set version number +ARG FRONTEND_VERSION +RUN npm version $FRONTEND_VERSION + +# Install dependencies +RUN npm ci --legacy-peer-deps + +# Copy project files +COPY . . + +RUN npm run build + +FROM alpine:latest as nginx-config +RUN apk --no-cache add gettext +WORKDIR /app +COPY nginx.conf.demo ./nginx.conf.demo +# This will get overwritten by helm chart + +ARG SERVER_NAME +ENV SERVER_NAME $SERVER_NAME +RUN cat nginx.conf.demo | envsubst > nginx.conf + +FROM nginx:alpine + +COPY --from=nginx-config /app/nginx.conf /etc/nginx/nginx.conf +COPY --from=Builder /usr/src/app/dist /usr/share/nginx/html + +# The default entrypoint works for us. \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile.dev similarity index 68% rename from frontend/Dockerfile rename to frontend/Dockerfile.dev index 3b0b404f..b652b980 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile.dev @@ -1,4 +1,5 @@ -# Use the official Node.js 14 image as the base image +# This dockerfile builds an image for a Vite development server +# Use the official Node.js image as the base image FROM node:18 # Set the working directory inside the container @@ -14,12 +15,12 @@ RUN npm ci --legacy-peer-deps COPY . . # Build the project -RUN npm run build +# RUN npm run build # Expose a port if required -EXPOSE 3000 +# EXPOSE 3000 -# Start the application +# Start the dev server CMD [ "npm", "run", "dev" ] # Set the image name diff --git a/frontend/docker-compose.demo.yaml b/frontend/docker-compose.demo.yaml new file mode 100644 index 00000000..652b992f --- /dev/null +++ b/frontend/docker-compose.demo.yaml @@ -0,0 +1,16 @@ +version: "3.8" +services: + frontend-static: + build: + context: . + dockerfile: Dockerfile.demo + args: + - IMAGE_NAME=frontend-static + - FRONTEND_VERSION=0.0.2 + - SERVER_NAME=localhost + image: ghcr.io/codeforphilly/balancer-main/frontend-static:0.0.2 + ports: + - "80:80" + environment: + - CHOKIDAR_USEPOLLING=true + - VITE_API_BASE_URL=https://devnull-as-a-service.com/dev/null diff --git a/frontend/docker-compose.yml b/frontend/docker-compose.dev.yaml similarity index 51% rename from frontend/docker-compose.yml rename to frontend/docker-compose.dev.yaml index 4114849e..3c9916f9 100644 --- a/frontend/docker-compose.yml +++ b/frontend/docker-compose.dev.yaml @@ -3,13 +3,14 @@ services: react-app: build: context: . - dockerfile: Dockerfile + dockerfile: Dockerfile.dev args: - - IMAGE_NAME=balancer-frontend + - IMAGE_NAME=balancer-frontend-dev ports: - "3000:3000" + # The port number is hard-coded, located in ./vite.config.ts environment: - CHOKIDAR_USEPOLLING=true volumes: - "./:/usr/src/app:delegated" - - "/usr/src/app/node_modules/" + - "./node_modules:/usr/src/app/node_modules/" diff --git a/frontend/nginx.conf.demo b/frontend/nginx.conf.demo new file mode 100644 index 00000000..c093b5e4 --- /dev/null +++ b/frontend/nginx.conf.demo @@ -0,0 +1,29 @@ +# nginx config file for static frontend demo site. +# This will be the nginx.conf in the docker image before it gets overwritten by kubernetes helm chart. +user nginx; + worker_processes 1; + events { + worker_connections 1024; + } + http { + include /etc/nginx/mime.types; + server { + listen 80; + listen [::]:80; + server_name $SERVER_NAME; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + } + } \ No newline at end of file diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml new file mode 100644 index 00000000..b990b819 --- /dev/null +++ b/helm-chart/Chart.yaml @@ -0,0 +1,9 @@ +name: nginx-helm-chart +description: A generated Helm Chart for nginx-helm-chart from Skippbox Kompose +version: 0.0.2 +apiVersion: v2 +keywords: + - nginx-helm-chart +sources: + - https://github.com/CodeForPhilly/balancer-main +home: https://opencollective.com/code-for-philly/projects/balancer diff --git a/helm-chart/README.md b/helm-chart/README.md new file mode 100644 index 00000000..2945440b --- /dev/null +++ b/helm-chart/README.md @@ -0,0 +1,2 @@ +Chart initially created by Kompose from nginx-docker-compose.yml + diff --git a/helm-chart/templates/frontend-static-deployment.yaml b/helm-chart/templates/frontend-static-deployment.yaml new file mode 100644 index 00000000..55f98f45 --- /dev/null +++ b/helm-chart/templates/frontend-static-deployment.yaml @@ -0,0 +1,54 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -c -f nginx-docker-compose.yml -o nginx-helm-chart + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.service: frontend-static + name: frontend-static +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: frontend-static + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -c -f nginx-docker-compose.yml -o nginx-helm-chart + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.network/frontend-default: "true" + io.kompose.service: frontend-static + spec: + containers: + - env: + - name: CHOKIDAR_USEPOLLING + value: "true" + - name: VITE_API_BASE_URL + value: {{ .Values.VITE_API_BASE_URL }} + + image: ghcr.io/codeforphilly/balancer-main/frontend-static:latest + name: frontend-static + ports: + - containerPort: 80 + protocol: TCP + volumeMounts: + - mountPath: /etc/nginx/nginx.conf + name: nginx-conf + subPath: nginx.conf + readOnly: true + resources: {} + volumes: + - name: nginx-conf + configMap: + name: nginx-conf + items: + - key: nginx.conf + path: nginx.conf + restartPolicy: Always +status: {} diff --git a/helm-chart/templates/frontend-static-service.yaml b/helm-chart/templates/frontend-static-service.yaml new file mode 100644 index 00000000..26c3db19 --- /dev/null +++ b/helm-chart/templates/frontend-static-service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert -c -f nginx-docker-compose.yml -o nginx-helm-chart + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.service: frontend-static + name: frontend-static +spec: + ports: + - name: "http" + port: 80 + protocol: TCP + selector: + io.kompose.service: frontend-static +status: + loadBalancer: {} diff --git a/helm-chart/templates/nginx-configmap.yaml b/helm-chart/templates/nginx-configmap.yaml new file mode 100644 index 00000000..8f1d45bf --- /dev/null +++ b/helm-chart/templates/nginx-configmap.yaml @@ -0,0 +1,45 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-conf +# https://stackoverflow.com/questions/64178370/custom-nginx-conf-from-configmap-in-kubernetes +data: + nginx.conf: | + user nginx; + worker_processes 1; + events { + worker_connections 1024; + } + http { + include /etc/nginx/mime.types; + error_log /var/log/nginx/error_log; + access_log /var/log/nginx/access_log; + server { + listen 80; + listen [::]:80; + server_name {{ .Values.nginx.serverName }}; + + location /access_log { + alias /var/log/nginx/access_log; + } + location /error_log { + alias /var/log/nginx/error_log; + } + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + #error_page 500 502 503 504 /50x.html; + #location = /50x.html { + # root /usr/share/nginx/html; + + #} + } + } + diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml new file mode 100644 index 00000000..91b342dd --- /dev/null +++ b/helm-chart/values.yaml @@ -0,0 +1,17 @@ +nginx: + serverName: "localhost" + +VITE_API_BASE_URL: https://devnull-as-a-service.com/dev/null + +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] \ No newline at end of file diff --git a/server/Dockerfile b/server/Dockerfile.dev similarity index 81% rename from server/Dockerfile rename to server/Dockerfile.dev index 74c7b6a7..e79d155b 100644 --- a/server/Dockerfile +++ b/server/Dockerfile.dev @@ -1,3 +1,5 @@ +# This image runs the Django lightweight development web server without the frontend. +# Intended to be run along with the frontend dev server. # pull official base image FROM python:3.11.4-slim-buster From 5620c9c59e6a5f1140b3c5f65f5a219f7342537b Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Tue, 12 Dec 2023 19:52:46 -0500 Subject: [PATCH 03/11] fix(ci): show same Docker tag in log output --- .github/workflows/containers-publish.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/containers-publish.yml b/.github/workflows/containers-publish.yml index 5a06ec39..c70e8417 100644 --- a/.github/workflows/containers-publish.yml +++ b/.github/workflows/containers-publish.yml @@ -46,10 +46,10 @@ jobs: --tag "${DOCKER_REPOSITORY}/frontend-static:latest" \ --tag "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}" \ frontend - - name: 'Push Docker container image frontend:latest' + - name: 'Push Docker container image frontend-static:latest' run: docker push "${DOCKER_REPOSITORY}/frontend-static:latest" - - name: 'Push Docker container image frontend:v*' + - name: 'Push Docker container image frontend-static:v*' run: docker push "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}" # # @@ -64,7 +64,6 @@ jobs: # # - name: Push Docker container image backend:v* # run: docker push "${DOCKER_REPOSITORY}/backend:${DOCKER_TAG}" - + # - name: Push Docker container image :v*" # run: docker push "${DOCKER_REPOSITORY}:${DOCKER_TAG}" - \ No newline at end of file From 82b8b377e03d5d84ef2bcae35414b39ed84ad129 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Tue, 12 Dec 2023 20:17:56 -0500 Subject: [PATCH 04/11] fix(ci): trigger container builds on tags --- .github/workflows/containers-publish.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/containers-publish.yml b/.github/workflows/containers-publish.yml index c70e8417..9d5ce469 100644 --- a/.github/workflows/containers-publish.yml +++ b/.github/workflows/containers-publish.yml @@ -1,9 +1,8 @@ name: 'Containers: Publish' on: - workflow_dispatch -# push: -# tags: [ 'v*' ] + push: + tags: [ 'v*' ] jobs: From a84cfefd66b7c7c44534652d7e2447ce8bf24a09 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Tue, 12 Dec 2023 20:51:24 -0500 Subject: [PATCH 05/11] fix(ci): add explicit write permission for packages --- .github/workflows/containers-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/containers-publish.yml b/.github/workflows/containers-publish.yml index 9d5ce469..4672a262 100644 --- a/.github/workflows/containers-publish.yml +++ b/.github/workflows/containers-publish.yml @@ -4,6 +4,8 @@ on: push: tags: [ 'v*' ] +permissions: + packages: write jobs: release-containers: From e023c7f55a20201f5777a72644cd6d94e0546af9 Mon Sep 17 00:00:00 2001 From: kristo-baricevic <108290619+kristo-baricevic@users.noreply.github.com> Date: Sun, 4 Feb 2024 16:32:59 -0500 Subject: [PATCH 06/11] test --- frontend/src/pages/About/About.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/About/About.tsx b/frontend/src/pages/About/About.tsx index 022001f1..255e54a1 100644 --- a/frontend/src/pages/About/About.tsx +++ b/frontend/src/pages/About/About.tsx @@ -37,14 +37,14 @@ function About() {
-
+ {/*
44 million
Transactions every 24 hours
$119 million
Assets under holding
46,000
New users annually
-
+
*/}
From 7761fc28a94c6ceee1352497eb61fc6077db00e9 Mon Sep 17 00:00:00 2001 From: Kristo Baricevic <108290619+kristo-baricevic@users.noreply.github.com> Date: Tue, 13 Feb 2024 13:57:56 -0500 Subject: [PATCH 07/11] Delete config/env/env.dev --- config/env/env.dev | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 config/env/env.dev diff --git a/config/env/env.dev b/config/env/env.dev deleted file mode 100644 index 8264ab26..00000000 --- a/config/env/env.dev +++ /dev/null @@ -1,13 +0,0 @@ -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= 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 -PINECONE_API_KEY= 6c326c1c-b0b6-45b8-acac-69eb0b235e34 \ No newline at end of file From 0a4a098a30489615ac9b7b34be53a11db7e8d538 Mon Sep 17 00:00:00 2001 From: kristo-baricevic <108290619+kristo-baricevic@users.noreply.github.com> Date: Thu, 22 Feb 2024 18:21:13 -0500 Subject: [PATCH 08/11] font sizes --- frontend/src/pages/Help/Help.tsx | 4 ++-- frontend/src/pages/Help/HowTo.tsx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/Help/Help.tsx b/frontend/src/pages/Help/Help.tsx index b5c8fdf9..c1067ed3 100644 --- a/frontend/src/pages/Help/Help.tsx +++ b/frontend/src/pages/Help/Help.tsx @@ -48,9 +48,9 @@ function Help() {
-

+

Help & Support Page -

+

diff --git a/frontend/src/pages/Help/HowTo.tsx b/frontend/src/pages/Help/HowTo.tsx index 7737538a..cd35153a 100644 --- a/frontend/src/pages/Help/HowTo.tsx +++ b/frontend/src/pages/Help/HowTo.tsx @@ -35,15 +35,15 @@ function HowTo() { return (
-

+

{howToData.title}

-

+

{howToData.paragraph[0]}

-

+

{howToData.paragraph[1]}

@@ -52,7 +52,7 @@ function HowTo() { {howToData.instructions.map((text, index) => { return (
  • {text} From b727f6aac39c3af2f88c31b1ad52bb32f0ed4283 Mon Sep 17 00:00:00 2001 From: kristo-baricevic <108290619+kristo-baricevic@users.noreply.github.com> Date: Thu, 22 Feb 2024 18:45:00 -0500 Subject: [PATCH 09/11] updated fonts and size of card --- frontend/src/pages/About/About.tsx | 10 ---------- frontend/src/pages/Help/Help.tsx | 2 -- frontend/src/pages/Help/HelpCard.tsx | 23 +++++++++++++++-------- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/frontend/src/pages/About/About.tsx b/frontend/src/pages/About/About.tsx index 3c3761cb..f280ebb3 100644 --- a/frontend/src/pages/About/About.tsx +++ b/frontend/src/pages/About/About.tsx @@ -81,16 +81,6 @@ function About() {
  • -
    -
    -
    44 million
    -
    Transactions every 24 hours
    -
    $119 million
    -
    Assets under holding
    -
    46,000
    -
    New users annually
    -
    -
    {/* Support Us section */} diff --git a/frontend/src/pages/Help/Help.tsx b/frontend/src/pages/Help/Help.tsx index c1067ed3..1765e708 100644 --- a/frontend/src/pages/Help/Help.tsx +++ b/frontend/src/pages/Help/Help.tsx @@ -61,14 +61,12 @@ function Help() { {data.icon.map((icon, index) => ( -
    -
    ))} diff --git a/frontend/src/pages/Help/HelpCard.tsx b/frontend/src/pages/Help/HelpCard.tsx index cc61e42d..751b0bbe 100644 --- a/frontend/src/pages/Help/HelpCard.tsx +++ b/frontend/src/pages/Help/HelpCard.tsx @@ -23,17 +23,24 @@ function HelpCard(data: HelpProps) { } setTitle(data.title); setParagraph(data.paragraph); - if (data.icon == "UserDoctor") { - setIcon(); - } else if (data.icon == "FeedbackIcon") { - setIcon(); - } else if (data.icon == "MagnifyingGlassChart") { - setIcon(); + switch (data.icon) { + case "UserDoctor": + setIcon(); + break; + case "FeedbackIcon": + setIcon(); + break; + case "MagnifyingGlassChart": + setIcon(); + break; + default: + setIcon(null); } - }, [paragraph, data, title]); + }, + [data.icon, data.title, data.paragraph]); return ( -
    +
    {icon &&
    {icon}
    }
    From 1fffb894cb67b31467df96bfa61a1c54684b1a9f Mon Sep 17 00:00:00 2001 From: kristo-baricevic <108290619+kristo-baricevic@users.noreply.github.com> Date: Sat, 24 Feb 2024 14:07:29 -0500 Subject: [PATCH 10/11] adjusted width --- frontend/src/pages/Help/Help.tsx | 17 ++++++++--------- frontend/src/pages/Help/HelpCard.tsx | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/frontend/src/pages/Help/Help.tsx b/frontend/src/pages/Help/Help.tsx index 1765e708..3c050a4f 100644 --- a/frontend/src/pages/Help/Help.tsx +++ b/frontend/src/pages/Help/Help.tsx @@ -46,7 +46,7 @@ function Help() { return ( -
    +

    Help & Support Page @@ -59,14 +59,13 @@ function Help() {

    {data.icon.map((icon, index) => ( - - - + + ))}
    diff --git a/frontend/src/pages/Help/HelpCard.tsx b/frontend/src/pages/Help/HelpCard.tsx index 751b0bbe..a72f5de1 100644 --- a/frontend/src/pages/Help/HelpCard.tsx +++ b/frontend/src/pages/Help/HelpCard.tsx @@ -40,7 +40,7 @@ function HelpCard(data: HelpProps) { [data.icon, data.title, data.paragraph]); return ( -
    +
    {icon &&
    {icon}
    }
    From 94c2f0cc23e54419361997e11e6c8b8d3bee54c0 Mon Sep 17 00:00:00 2001 From: kristo-baricevic <108290619+kristo-baricevic@users.noreply.github.com> Date: Tue, 12 Mar 2024 15:01:29 -0400 Subject: [PATCH 11/11] updated colors --- frontend/src/pages/Help/FeedbackIcon.tsx | 2 +- frontend/src/pages/Help/LineChart.tsx | 2 +- frontend/src/pages/Help/MagnifyingGlassChart.tsx | 2 +- frontend/src/pages/Help/UserDoctor.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/Help/FeedbackIcon.tsx b/frontend/src/pages/Help/FeedbackIcon.tsx index 142b1920..e0554b5b 100644 --- a/frontend/src/pages/Help/FeedbackIcon.tsx +++ b/frontend/src/pages/Help/FeedbackIcon.tsx @@ -2,7 +2,7 @@ import React from 'react'; const FeedbackIcon = () => ( - + ); diff --git a/frontend/src/pages/Help/LineChart.tsx b/frontend/src/pages/Help/LineChart.tsx index d3822893..58d28626 100644 --- a/frontend/src/pages/Help/LineChart.tsx +++ b/frontend/src/pages/Help/LineChart.tsx @@ -2,7 +2,7 @@ import React from "react"; const LineChart = () => ( - + ); diff --git a/frontend/src/pages/Help/MagnifyingGlassChart.tsx b/frontend/src/pages/Help/MagnifyingGlassChart.tsx index e24e0f44..20b4daa5 100644 --- a/frontend/src/pages/Help/MagnifyingGlassChart.tsx +++ b/frontend/src/pages/Help/MagnifyingGlassChart.tsx @@ -2,7 +2,7 @@ import React from "react"; const MagnifyingGlassChart = () => ( - + ); diff --git a/frontend/src/pages/Help/UserDoctor.tsx b/frontend/src/pages/Help/UserDoctor.tsx index 229c4c63..08d57d64 100644 --- a/frontend/src/pages/Help/UserDoctor.tsx +++ b/frontend/src/pages/Help/UserDoctor.tsx @@ -2,7 +2,7 @@ import React from "react"; const UserDoctor = () => ( - + );