This repo will let you deploy a ppt to pdf service, using S3 as storage, in a snap. This service will get the ppt file from S3 storage and upload the pdf file back to S3 storage.
- Install Docker
- Install Docker Compose
- Clone the repo using
git clone https://github.com/kito-arch/ppt-to-pdf.git - Provide env variables by creating copying
.env.sampleand renaming the copied file to.env. Replace the respective env values. - Run command:
docker-compose upto build and run the container ofppt to pdfimage. You may run the commanddocker-compose up -dinstead, to run the service in the background. - The above command will take some time and when done, you will see
Server running on port 3000logged on your terminal. This means our service is running on port 3000. - In case you change the code or Dockerfile, you would need to run docker compose by forcefully rebuilding a new image by:
docker-compose up --build
{
"bucket": "<your s3 bucket name>",
"pptKey": "<your ppt path i.e 'public/ppt/ppt1.pptx' >"
}
{
"message": "Conversion successful",
"pdfUrl": "<Full url for your generated pdf i.e 'https://bucket.s3.region.amazonaws.com/public/ppt/pp1.pdf' >"
}
This is a basic utility, you may want to improve the security by:
- Providing dynamic env rather than storing in .env using Key Vaults.
- Restricting the incoming request only from your authenticated apps by CORS.
- And so on..