-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This wiki provides a comprehensive, step-by-step guide to running TinyLinker, either using Docker or Kubernetes. Follow the instructions below to quickly get started.
To run the TinyLinker project using Docker, follow these steps:
-
Clone the Repository:
git clone https://github.com/vybraan/TinyLinker.git
-
Navigate to the Project Directory:
cd TinyLinker
-
Polulate The Environment file
.env
NEXTAUTH_SECRET=secretjeynext NEXTAUTH_URL=http://localhost:3000 # Your choice NEXT_PUBLIC_DOMAIN=http://localhost:3000 # Your choice JWT_SECRET=secrety AUTH_TL_BASE_URL=http://authtl:8080 SHORTIFY_BASE_URL=http://tlshorten:8080 REDIS_URL=redis://redis:6379 GOOGLE_CLIENT_ID=clientIDvalue GOOGLE_CLIENT_SECRET=clientsecretvalue
-
Start the Application with Docker Compose:
sudo docker compose up -d
-
Check the Logs: Ensure everything is running as expected by viewing the logs:
sudo docker compose logs -f
TinyLinker is also configured to run in a Kubernetes cluster. The following steps will guide you through setting it up.
- A Kubernetes cluster set up and running
-
kubectl
installed and configured to interact with your cluster
-
Apply Namespace Configuration:
kubectl apply -f k8s/namespace.yaml
-
Apply Persistent Volume Claims:
kubectl apply -f k8s/claims.yaml
-
Apply Configuration and Secrets: Apply application secrets and config maps:
kubectl apply -f k8s/app-secrets.yaml kubectl apply -f k8s/app-config.yaml
-
Apply Service Definitions: Apply the services for each component:
kubectl apply -f k8s/authtl/service.yaml kubectl apply -f k8s/tlshorten/service.yaml kubectl apply -f k8s/redis/service.yaml kubectl apply -f k8s/tldash/service.yaml
-
Apply Deployment Configurations: Deploy the services to your Kubernetes cluster:
kubectl apply -f k8s/authtl/deployment.yaml kubectl apply -f k8s/tlshorten/deployment.yaml kubectl apply -f k8s/redis/deployment.yaml kubectl apply -f k8s/tldash/deployment.yaml
Since the app is not publicly accessible by default, you can use port forwarding to access the dashboard. Run the following command to forward port 3000:
kubectl port-forward svc/tldash-service 3000:3000 -n tiny-linker
After running the command, you can access the TinyLinker dashboard at http://localhost:3000
.
Documentation on how to run the app manually is in progress.