This is a microservice built with FastAPI/Python that manages user-related functionality. The service can be run using three different approaches:
- Building the image manually
- Running with Docker Compose
- Running with Kubernetes
You can build the image and run the service manually using the provided shell scripts:
-
Give execution permission to the script:
chmod +x run.sh
-
Run the service:
./run.sh
-
To stop the service:
./stop.sh
You can also run the service using Docker Compose:
docker compose up
Or run it in detached mode:
docker compose up -d
To run the microservice using Kubernetes, execute the following script:
./setup_k8s.sh
This will deploy the service on your Kubernetes cluster. If you want to remove the Kubernetes setup, run:
./remove_k8s.sh
Ensure you have a configured and authenticated Kubernetes cluster before running these commands.
Add the following secrets to your GitHub Actions to automate the build and deployment process:
DATABASE_URL
DOCKERHUB_REPO
DOCKERHUB_TOKEN
DOCKERHUB_USERNAME
POSTGRES_DB
POSTGRES_PASSWORD
POSTGRES_USER
These secrets are required for deploying the service, either through Docker or Kubernetes, in CI/CD workflows. Customize them based on your setup.
Note: This microservice is part of a larger orchestrated microservices architecture. You can find more details on orchestration and setup in the Orchestrated Microservices repository.