-
Notifications
You must be signed in to change notification settings - Fork 33
documentation(EJ2-896949): Added the docker image content for Spreadsheet component #3197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
fb83c5f
896949: Added the docker image content for Spreadsheet component.
DinakarSF4212 5e06b63
896949: Addressed review comments.
DinakarSF4212 d19cc81
896949: Addressed the review comments.
DinakarSF4212 cf68362
896949: Addressed the review comments.
DinakarSF4212 017c7dc
Merge branch 'development' into EJ2-896949
DinakarManickam4212 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
--- | ||
layout: post | ||
title: Docker image deployment in ##Platform_Name## Spreadsheet control | Syncfusion | ||
description: Learn here all about Docker image deployment in Syncfusion ##Platform_Name## Spreadsheet control of Syncfusion Essential JS 2 and more. | ||
platform: ej2-asp-core-mvc | ||
control: Docker deployment | ||
publishingplatform: ##Platform_Name## | ||
documentation: ug | ||
domainurl: ##DomainURL## | ||
--- | ||
|
||
# Docker Image Overview in ##Platform_Name## Spreadsheet control | ||
|
||
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. | ||
|
||
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. | ||
|
||
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). | ||
|
||
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. | ||
|
||
## Prerequisites | ||
|
||
Have [`Docker`](https://www.docker.com/products/container-runtime#/download) installed in your environment: | ||
|
||
* On Windows, install [`Docker for Windows`](https://hub.docker.com/editions/community/docker-ce-desktop-windows). | ||
* On macOS, install [`Docker for Mac`](https://docs.docker.com/desktop/install/mac-install/). | ||
|
||
## How to deploy the Spreadsheet Docker Image | ||
|
||
**Step 1:** Pull the spreadsheet-server image from Docker Hub. | ||
|
||
```console | ||
docker pull syncfusion/spreadsheet-server | ||
``` | ||
|
||
**Step 2:** Create the `docker-compose.yml` file with the following code in your file system. | ||
|
||
```yaml | ||
version: '3.4' | ||
|
||
services: | ||
spreadsheet-server: | ||
image: syncfusion/spreadsheet-server:latest | ||
environment: | ||
# Provide your license key for activation | ||
SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY | ||
ports: | ||
- "6002:80" | ||
``` | ||
|
||
**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. | ||
|
||
**Step 3:** In a terminal tab, navigate to the directory where you've placed the `docker-compose.yml` file and execute the following: | ||
|
||
```console | ||
docker-compose up | ||
``` | ||
|
||
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`. | ||
|
||
**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) | ||
|
||
{% if page.publishingplatform == "aspnet-core" %} | ||
|
||
{% tabs %} | ||
{% highlight cshtml tabtitle="CSHTML" %} | ||
|
||
``` | ||
<ejs-spreadsheet id="spreadsheet" openUrl="Open" allowOpen = "true" beforeOpen="beforeOpen"> | ||
|
||
</ejs-spreadsheet> | ||
|
||
<script> | ||
|
||
function beforeOpen(args) { | ||
// your code snippets here | ||
} | ||
|
||
</script> | ||
``` | ||
|
||
{% endhighlight %} | ||
|
||
{% highlight c# tabtitle="Opencontroller.cs" %} | ||
|
||
```cs | ||
public IActionResult Open(IFormCollection openRequest) | ||
DinakarManickam4212 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
OpenRequest open = new OpenRequest(); | ||
open.File = openRequest.Files[0]; | ||
return Content(Workbook.Open(open)); | ||
} | ||
``` | ||
|
||
{% endhighlight %} | ||
{% endtabs %} | ||
|
||
{% elsif page.publishingplatform == "aspnet-mvc" %} | ||
|
||
{% tabs %} | ||
{% highlight razor tabtitle="CSHTML" %} | ||
|
||
``` | ||
@Html.EJS().Spreadsheet("spreadsheet").OpenUrl("http://localhost:6002/api/spreadsheet/open").SaveUrl("http://localhost:6002/api/spreadsheet/save").AllowOpen(true).AllowSave(true).BeforeOpen("beforeOpen").Render() | ||
|
||
<script> | ||
|
||
function beforeOpen(args) { | ||
// your code snippets here | ||
} | ||
|
||
</script> | ||
``` | ||
{% endhighlight %} | ||
{% highlight c# tabtitle="Opencontroller.cs" %} | ||
```cs | ||
public IActionResult Open(IFormCollection openRequest) | ||
DinakarManickam4212 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
OpenRequest open = new OpenRequest(); | ||
open.File = openRequest.Files[0]; | ||
return Content(Workbook.Open(open)); | ||
} | ||
``` | ||
{% endhighlight %} | ||
{% endtabs %} | ||
{% endif %} | ||
|
||
## How to configure different cultures using a Docker compose file | ||
|
||
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. | ||
|
||
```yaml | ||
version: '3.4' | ||
|
||
services: | ||
spreadsheet-server: | ||
image: syncfusion/spreadsheet-server:latest | ||
environment: | ||
# Provide your license key for activation | ||
SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY | ||
# Specify the culture to configure for the Spreadsheet server | ||
LC_ALL: de_DE.UTF-8 | ||
LANGUAGE: de_DE.UTF-8 | ||
LANG: de_DE.UTF-8 | ||
ports: | ||
- "6002:80" | ||
``` | ||
|
||
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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.