Skip to content

Latest commit

 

History

History
131 lines (89 loc) · 3.2 KB

README.md

File metadata and controls

131 lines (89 loc) · 3.2 KB

Helper

Goal

The goal of Helper is to ensure that I am able to be the Hands and Feet of God and to help others do the same.

Demos

Version 1

Screenshots/

User Dashboard

Create Help Item

View Help Item

Group Dashboard with Browser Darkmode

Development

We have split the Client and the API. The Client is responsible for serving the Server-Side rendered Markup, along with handling any HTTP requests that the Browser makes, such as Form Submitions (Functions) or dynamic pages (Pages). The API is responsible for understanding and serving the Data Layer (PSQL) and for handling any authorization needed.

Minikube/Docker

You can develop using K8s/Docker locally via Minikube and K9s.

1. Start Minikube

minikube start --addons=ingress,metrics-server --cpus=max

![Expected Output](./artifacts/Screenshot from 2022-08-27 10.45.20.png)

2. Connect via K9s

k9s

Expected Output

3. Connect Minikube to Local Docker Commands

This will make all docker commands typed in the shell session to be able to be reached by Minikube. Specifically, this will allow you to run docker build and docker tag commands and then have Minikube "pull" the Images from that output.

Do this in a shell that you will have open forever and that you don't mind running any docker commands on

eval $(minikube docker-env)

Expected Output

4. Build and Tag Images

# build client and tag it mckp/helper-client
# using the file Client.Dockerfile
# and using the context of this current directory
docker build -t mckp/helper-client -f Client.Dockerfile .
# You can also run
# ./scripts/build-client

# build api and tag it mckp/helper-api
# using the file API.Dockerfile
# and using the context of this current directory
docker build -t mckp/helper-api -f API.Dockerfile . 
# You can also run
# ./scripts/build-api

# You can build thema ll via
./scripts/build-services

5. Apply K8s

kubectl apply -k ./k8s

Should cause pods to be created in your Minikube cluster

Expected Output

6. /etc/hosts

You should be able to set your /etc/hosts file to point the helper.local to the minikube ip address:

192.168.49.2 helper.local

Local Development

If you have your own PSQL instance running along with your own Node install and want to run the services locally on your machine, you are free to use Yarn to install and run the projects via yarn to install the deps and yarn dev to run in development mode:

Install Dependencies

cd client && yarn
cd ../
cd api && yarn
cd ../

Start Services

# In one terminal
cd client && yarn dev

# In another terminal
cd api && yarn dev