Running Self-Hosted Solution
Docker technology is designed to automate the deployment of applications by using lightweight containers. Developers can use Docker Container to wrap the application with all of its libraries and dependencies and deploy everything as a single package.
Aspose.Slides Cloud team has published Docker Image on Docker Hub to facilitate Docker users.
You can host your own Slides Cloud API instance using this image. It offers most functionality available at api.aspose.cloud, though the solutions differ in some aspects.
To use Slides Cloud docker image, you should obtain Metered license. Without license, the application will run in trial mode.
Run Container using Command Line
You can use the following command to run the container after pulling it from Docker Hub.
docker run -p 8088:80 -e "LicensePublicKey=public_key" -e "LicensePrivateKey=private_key" -v "/data:/storage" aspose/slides-cloud
In the example above, the data folder of the host computer is used as file storage. There are other options to use storage with self-hosted solution.
Configuration for Docker-Compose Tool
You can write the following configuration in your yaml file for Docker-Compose tool:
AsposeSlidesCloud:
image: aspose/slides-cloud
ports: ["8088:80"]
volumes: [
"./storage:/storage",
]
environment:
"ClientId": "User"
"ClientSecret": "Password"
"LicensePublicKey": "public_key"
"LicensePrivateKey": "private_key"
See the list of available configuration options here.
Call the container using Slides.Cloud API
Once your container is running, you can make Slides.Cloud REST API requests to it just like you do it with Slides.Cloud online application. Below is an example cURL command to convert a presentation to PDF format.
curl -X POST "http://localhost:8088/v3.0/slides/convert/pdf" --data-binary "@presentation.pptx" -H "Content-Type: application/octet-stream" -o "presentation.pdf"