- Create an app in Twitter develop console
- Copy .env.template as .env
- Fill in .env values
- Run the code
docker-compose build docker-compose up -d
- Enter mongodb shell with your username and password:
docker-compose exec db mongosh -u "..." -p "..."
- Enter backend if you want to create a new spider:
docker-compose exec backend bash
- Check backend log:
docker-compose logs -f backend
If ypu are using Mac M1 as same as me, please try to use the commend under.
- Initalize minikube with docker engine
minikube start --driver=docker --alsologtostderr
- Mount local storage to minikube VM
minikube mount <source directory>:<target directory>
- Deploy all the mechines
kubectl apply -f backend-claim0-persistentvolumeclaim.yaml , backend-deployment.yaml , backend-service.yaml , db-claim0-persistentvolumeclaim.yaml , db-claim1-persistentvolumeclaim.yaml , db-deployment.yaml , db-service.yaml
- Open the backend service
minikube service backend-db-service
- List all pod:
kubectl get pod
- Enter backend shell:
kubectl exec -it <backend pod name> bash
- Enter db shell with username and password
kubectl exec -it <db pod name> bash mongosh "mongodb://<username>:<password>@localhost:27017"
- Check logs:
kubectl logs -f <backend pod name>
(Check my medium for detail records)