|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: Docker image deployment in ##Platform_Name## Spreadsheet control | Syncfusion |
| 4 | +description: Learn here all about Docker image deployment in Syncfusion ##Platform_Name## Spreadsheet control of Syncfusion Essential JS 2 and more. |
| 5 | +platform: ej2-asp-core-mvc |
| 6 | +control: Docker deployment |
| 7 | +publishingplatform: ##Platform_Name## |
| 8 | +documentation: ug |
| 9 | +domainurl: ##DomainURL## |
| 10 | +--- |
| 11 | + |
| 12 | +# Docker Image Overview in ##Platform_Name## Spreadsheet control |
| 13 | + |
| 14 | +The [**Syncfusion Spreadsheet (also known as Excel Viewer)**](https://www.syncfusion.com/aspnet-mvc-ui-controls/spreadsheet) is a feature-rich control for organizing and analyzing data in a tabular format. It provides all the common Excel features, including data binding, selection, editing, formatting, resizing, sorting, filtering, importing, and exporting Excel documents. |
| 15 | + |
| 16 | +This Docker image is the pre-defined Docker container for Syncfusion's Spreadsheet backend functionalities. This server-side Web API project targets ASP.NET Core 6.0. |
| 17 | + |
| 18 | +You can deploy it quickly to your infrastructure. If you want to add new functionality or customize any existing functionalities, create your own Docker file by referencing the existing [Spreadsheet Docker project](https://github.com/SyncfusionExamples/Spreadsheet-Server-Docker). |
| 19 | + |
| 20 | +The Spreadsheet is supported on the [JavaScript](https://www.syncfusion.com/javascript-ui-controls), [Angular](https://www.syncfusion.com/angular-ui-components), [React](https://www.syncfusion.com/react-ui-components), [Vue](https://www.syncfusion.com/vue-ui-components), [ASP.NET Core](https://www.syncfusion.com/aspnet-core-ui-controls), and [ASP.NET MVC](https://www.syncfusion.com/aspnet-mvc-ui-controls) platforms. |
| 21 | + |
| 22 | +## Prerequisites |
| 23 | + |
| 24 | +Have [`Docker`](https://www.docker.com/products/container-runtime#/download) installed in your environment: |
| 25 | + |
| 26 | +* On Windows, install [`Docker for Windows`](https://hub.docker.com/editions/community/docker-ce-desktop-windows). |
| 27 | +* On macOS, install [`Docker for Mac`](https://docs.docker.com/desktop/install/mac-install/). |
| 28 | + |
| 29 | +## How to deploy the Spreadsheet Docker Image |
| 30 | + |
| 31 | +**Step 1:** Pull the spreadsheet-server image from Docker Hub. |
| 32 | + |
| 33 | +```console |
| 34 | +docker pull syncfusion/spreadsheet-server |
| 35 | +``` |
| 36 | + |
| 37 | +**Step 2:** Create the `docker-compose.yml` file with the following code in your file system. |
| 38 | + |
| 39 | +```yaml |
| 40 | +version: '3.4' |
| 41 | + |
| 42 | +services: |
| 43 | + spreadsheet-server: |
| 44 | + image: syncfusion/spreadsheet-server:latest |
| 45 | + environment: |
| 46 | + # Provide your license key for activation |
| 47 | + SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY |
| 48 | + ports: |
| 49 | + - "6002:80" |
| 50 | +``` |
| 51 | +
|
| 52 | +**Note:** The Spreadsheet is a commercial product. It requires a valid [license key](https://help.syncfusion.com/common/essential-studio/licensing/licensing-faq/where-can-i-get-a-license-key) to use in a production environment. Please replace `YOUR_LICENSE_KEY` with the valid license key in the `docker-compose.yml` file. |
| 53 | + |
| 54 | +**Step 3:** In a terminal tab, navigate to the directory where you've placed the `docker-compose.yml` file and execute the following: |
| 55 | + |
| 56 | +```console |
| 57 | +docker-compose up |
| 58 | +``` |
| 59 | + |
| 60 | +Now the Spreadsheet server Docker instance runs on localhost with the provided port number `http://localhost:6002`. Open this link in a browser and navigate to the Spreadsheet Web API open and save service at `http://localhost:6002/api/spreadsheet/open` and `http://localhost:6002/api/spreadsheet/save`. |
| 61 | + |
| 62 | +{% if page.publishingplatform == "aspnet-core" %} |
| 63 | + |
| 64 | +**Step 4:** Append the URLs of the Docker instance running services to the [`openUrl`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_OpenUrl) property as `http://localhost:6002/api/spreadsheet/open` and the [`saveUrl`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_SaveUrl) property as `http://localhost:6002/api/spreadsheet/save` in the client-side Spreadsheet control. For more information on how to get started with the Spreadsheet control, refer to this [`getting started page.`](https://ej2.syncfusion.com/aspnetcore/documentation/spreadsheet/getting-started-core) |
| 65 | + |
| 66 | +{% elsif page.publishingplatform == "aspnet-mvc" %} |
| 67 | + |
| 68 | +**Step 4:** Append the URLs of the Docker instance running services to the [`openUrl`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_OpenUrl) property as `http://localhost:6002/api/spreadsheet/open` and the [`saveUrl`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_SaveUrl) property as `http://localhost:6002/api/spreadsheet/save` in the client-side Spreadsheet control. For more information on how to get started with the Spreadsheet control, refer to this [`getting started page.`](https://ej2.syncfusion.com/aspnetmvc/documentation/spreadsheet/getting-started-mvc) |
| 69 | + |
| 70 | +{% endif %} |
| 71 | + |
| 72 | +{% if page.publishingplatform == "aspnet-core" %} |
| 73 | + |
| 74 | +{% tabs %} |
| 75 | +{% highlight cshtml tabtitle="CSHTML" %} |
| 76 | + |
| 77 | +<ejs-spreadsheet id="spreadsheet" openUrl="http://localhost:6002/api/spreadsheet/open" allowOpen="true" saveUrl="http://localhost:6002/api/spreadsheet/save" allowSave="true"> |
| 78 | +</ejs-spreadsheet> |
| 79 | + |
| 80 | +{% endhighlight %} |
| 81 | +{% endtabs %} |
| 82 | + |
| 83 | +{% elsif page.publishingplatform == "aspnet-mvc" %} |
| 84 | + |
| 85 | +{% tabs %} |
| 86 | +{% highlight razor tabtitle="CSHTML" %} |
| 87 | + |
| 88 | +@Html.EJS().Spreadsheet("spreadsheet").OpenUrl("http://localhost:6002/api/spreadsheet/open").AllowOpen(true).SaveUrl("http://localhost:6002/api/spreadsheet/save").AllowSave(true).Render() |
| 89 | + |
| 90 | +{% endhighlight %} |
| 91 | +{% endtabs %} |
| 92 | + |
| 93 | +{% endif %} |
| 94 | + |
| 95 | +## How to configure different cultures using a Docker compose file |
| 96 | + |
| 97 | +By default, the Spreadsheet Docker container is generated in the `en_US` culture. You can configure different cultures using the `LC_ALL`, `LANGUAGE`, and `LANG` environment variables in the `docker-compose.yml` file. These environment variables are replaced in the Docker file to set the specified culture for the Spreadsheet server. |
| 98 | + |
| 99 | +```yaml |
| 100 | +version: '3.4' |
| 101 | +
|
| 102 | +services: |
| 103 | + spreadsheet-server: |
| 104 | + image: syncfusion/spreadsheet-server:latest |
| 105 | + environment: |
| 106 | + # Provide your license key for activation |
| 107 | + SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY |
| 108 | + # Specify the culture to configure for the Spreadsheet server |
| 109 | + LC_ALL: de_DE.UTF-8 |
| 110 | + LANGUAGE: de_DE.UTF-8 |
| 111 | + LANG: de_DE.UTF-8 |
| 112 | + ports: |
| 113 | + - "6002:80" |
| 114 | +``` |
| 115 | + |
| 116 | +Please refer to these getting started pages to create a Spreadsheet in [`Angular`](https://ej2.syncfusion.com/angular/documentation/spreadsheet/getting-started), [`React`](https://ej2.syncfusion.com/react/documentation/spreadsheet/getting-started), [`Vue`](https://ej2.syncfusion.com/vue/documentation/spreadsheet/getting-started), [`ASP.NET Core`](https://ej2.syncfusion.com/aspnetcore/documentation/spreadsheet/getting-started-core), and [`ASP.NET MVC`](https://ej2.syncfusion.com/aspnetmvc/documentation/spreadsheet/getting-started-mvc). |
0 commit comments