Cricket API - Deploy Live Cricket Score API for free in Vercel and Docker.
Learn More about the API Here - https://github.com/sanwebinfo/cricket-api
- Deploy on Vercel
Keep Running the PHP API in Docker
- Update the
.dockerfilebefore build - Modify it according to your Needs - on production server use apache or nginx as reverse proxy for this docker container
FROM php:8.1-cli-alpine
COPY . /var/www/html
WORKDIR /var/www/html
EXPOSE 6002
CMD ["php", "-S", "0.0.0.0:6002", "-t", "/var/www/html"]FROM php:8.1-apache
COPY . /var/www/html
WORKDIR /var/www/html
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf## Build image
docker build . -t="cri-deploy"
## List the image
docker image ls
## Create and Test Container
docker run -d -p 6002:6002 --name cricket cri-deploy
docker container ps
docker stop (containerID)
## For apache
sudo docker run -d -p 6002:80 --name cricket cri-deploy
## Run the container forever (Localhost server)
docker run -d --restart=always -p 6002:6002 --name cricket cri-deploy
## Apache server
sudo docker run -d --restart=always -p 6002:80 --name cricket cri-deploy
## List Hidden container if error exists
docker ps -a
## other commands
docker logs (containerID)
docker logs --follow (containerID)
docker stop (containerID)
docker rm (containerid)
docker rmi (imageid)
docker image prune
docker builder prune --all -f
docker system prune --all
docker rm $(docker ps -all -q)
docker rmi $(docker image ls -q)- This is not an Offical API from Cricbuzz - it's an Unofficial API
- This is for Education Purpose only - use at your own risk on Production Site
All Credits Goes to https://www.cricbuzz.com/
MIT