This project is still under development.
You can play with the application by visiting the following link:
https://edward1141.xyz/task-manager
Sometimes the server might be sleeping, so you may need to wait for it to wake up :)
This project is a task manager application that allows you to manage your tasks for your team.
We have make use of the following stack:
- Frontend: Next.js
- Serverless Backend: OpenFaas with java functions
- Database: PostgreSQL
- Caching: Redis
And all the services can be deployed to kubernetes cluster.
https://docs.docker.com/engine/install
note: login to docker hub afterwards, and you may want to change the docker registry to your own in
task-manager/stack.yaml,frontend/deployment/deployment.yamlandscripts/frontend_deploy.sh
Optional if you already have a kubernetes cluster or you want to use other methods to create a kubernetes cluster like minikube.
https://k3d.io/stable/#install-current-latest-release
https://blog.kubesimplify.com/arkade#heading-installing-arakde
https://helm.sh/docs/intro/install/
https://docs.openfaas.com/cli/install/
sudo apt-get install gettext-baseA quick guide to setup openfaas in kubernetes cluster.
This will create a kubernetes cluster with 1 server and 3 agents and map the ports 80, 443, 5051, 5052, 8080 for load balancer, 6443 for server.
k3d cluster create --config kube-config/k3d-config.yaml arkade install openfaas --load-balancerPut the secrets in the .secrets folder under the root of the project.
# Structure of the folder
.secrets/
├── .env
├── postgresql-secret.env
├── redis-secret.env
├── auth-secret.env.env
# For access of openfaas and faas-cli to deploy functions
CLUSTER_MACHINE_IP=your_cluster_machine_ip
# For access of frontend to backend, depends on the kubectl port-forward / nginx proxy
PUBLIC_API_URL=your_public_api_urlpostgresql-secret.env
DB_USER="postgres"
DB_PASSWORD="your_postgresql_password"redis-secret.env
REDIS_PASSWORD=your_redis_passwordauth-secret.env
AUTH_SECRET_KEY=your_auth_secret_key
# you can also generate a random string by running: openssl rand -base64 32helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo updatebash scripts/postgresql_deploy.shAfter the deployment, please refer to this guide to setup the database.
bash scripts/redis_deploy.sh
### Deploy Frontend on kubernetes
note: you may need to push your own docker image to docker hub, and change the image name in the `frontend/deployment/deployment.yaml` and `scripts/frontend_deploy.sh`
```bash
bash scripts/frontend_deploy.shnote: you may need to push your own docker image to docker hub, and change the image name in the task-manager/stack.yaml
bash scripts/openfaas_deploy.shAfter the deployment, you can access the task manager by:
- kubectl port-forward for accessing the frontend and backend, or
- deploy a custom nginx proxy to access the frontend and backend

