sadpandajoe commented on code in PR #36028:
URL: https://github.com/apache/superset/pull/36028#discussion_r2505243059


##########
docs/docs/contributing/howtos.mdx:
##########
@@ -166,6 +166,56 @@ server:
 npm run dev-server
 ```
 
+#### Deploying your visualization plugin
+
+Once your plugin is complete, you will need to deploy it to your superset 
instance.
+
+This step assumes your are running your own docker image as described 
[here](https://superset.apache.org/docs/installation/docker-builds/#building-your-own-production-docker-image).
+Instructions may vary for other kinds of deployments.
+
+If you have your own superset docker image, your first line is most likely:
+`FROM apache/superset:latest` or something similar. You will need to compile
+your own `lean` image and replace this FROM line with your own image.

Review Comment:
   ```suggestion
   your own `"lean"` image and replace this FROM line with your own image.
   ```



##########
docs/docs/contributing/howtos.mdx:
##########
@@ -166,6 +166,56 @@ server:
 npm run dev-server
 ```
 
+#### Deploying your visualization plugin
+
+Once your plugin is complete, you will need to deploy it to your superset 
instance.
+
+This step assumes your are running your own docker image as described 
[here](https://superset.apache.org/docs/installation/docker-builds/#building-your-own-production-docker-image).
+Instructions may vary for other kinds of deployments.
+
+If you have your own superset docker image, your first line is most likely:

Review Comment:
   ```suggestion
   If you have your own Superset Docker image, the first line is most likely:
   ```



##########
docs/docs/contributing/howtos.mdx:
##########
@@ -166,6 +166,56 @@ server:
 npm run dev-server
 ```
 
+#### Deploying your visualization plugin
+
+Once your plugin is complete, you will need to deploy it to your superset 
instance.
+
+This step assumes your are running your own docker image as described 
[here](https://superset.apache.org/docs/installation/docker-builds/#building-your-own-production-docker-image).

Review Comment:
   ```suggestion
   This step assumes you are running your own Docker image as described 
[here](https://superset.apache.org/docs/installation/docker-builds/#building-your-own-production-docker-image).
   ```



##########
docs/docs/contributing/howtos.mdx:
##########
@@ -166,6 +166,56 @@ server:
 npm run dev-server
 ```
 
+#### Deploying your visualization plugin
+
+Once your plugin is complete, you will need to deploy it to your superset 
instance.
+
+This step assumes your are running your own docker image as described 
[here](https://superset.apache.org/docs/installation/docker-builds/#building-your-own-production-docker-image).
+Instructions may vary for other kinds of deployments.
+
+If you have your own superset docker image, your first line is most likely:
+`FROM apache/superset:latest` or something similar. You will need to compile
+your own `lean` image and replace this FROM line with your own image.
+
+1. publish your chart plugin to npm - it makes the build process simpler
+
+Note: if your chart is not published to npm, then in the docker build below, 
you will need
+to edit the default Dockerfile to copy your plugin source code to the 
appropriate
+location in the container build environment.
+
+2. Install your chart in the frontend with `npm i <your_chart_package>`
+3. Start with a base superset release
+
+```bash
+git checkout tags/X.0.0
+```
+
+4. Install your chart with the instructions you followed during development.
+5. navigate to the root of your superset directory.
+6. Run `docker build -t apache/superset:mychart --target lean .`
+7. Rebuild your projection container using `FROM apache/superset:mychart`

Review Comment:
   ```suggestion
   7. Rebuild your production container using `FROM apache/superset:mychart`
   ```



##########
docs/docs/contributing/howtos.mdx:
##########
@@ -166,6 +166,56 @@ server:
 npm run dev-server
 ```
 
+#### Deploying your visualization plugin
+
+Once your plugin is complete, you will need to deploy it to your superset 
instance.
+
+This step assumes your are running your own docker image as described 
[here](https://superset.apache.org/docs/installation/docker-builds/#building-your-own-production-docker-image).
+Instructions may vary for other kinds of deployments.
+
+If you have your own superset docker image, your first line is most likely:
+`FROM apache/superset:latest` or something similar. You will need to compile
+your own `lean` image and replace this FROM line with your own image.
+
+1. publish your chart plugin to npm - it makes the build process simpler
+
+Note: if your chart is not published to npm, then in the docker build below, 
you will need
+to edit the default Dockerfile to copy your plugin source code to the 
appropriate
+location in the container build environment.
+
+2. Install your chart in the frontend with `npm i <your_chart_package>`
+3. Start with a base superset release
+
+```bash
+git checkout tags/X.0.0
+```
+
+4. Install your chart with the instructions you followed during development.
+5. navigate to the root of your superset directory.
+6. Run `docker build -t apache/superset:mychart --target lean .`
+7. Rebuild your projection container using `FROM apache/superset:mychart`
+
+This will create a new productized superset container with your new chart 
compiled in.
+Then you can recreate your custom production container based on a superset 
built with your chart.
+
+##### Troubleshooting
+
+
+- If you get the following NPM error:
+
+```
+npm error `npm ci` can only install packages when your package.json and 
package-lock.json
+```
+
+It's because your local nodejs/npm version is different than the one being 
used inside docker.
+
+You can resolve this by running npm install with the same version used by the 
container build process
+
+Replace XYZ in the following command with the node tag used in the Dockerfile 
(search for "node:" in the dockerfile to find the tag).

Review Comment:
   ```suggestion
   Replace XYZ in the following command with the node tag used in the 
Dockerfile (search for "node:" in the Dockerfile to find the tag).
   ```



##########
docs/docs/contributing/howtos.mdx:
##########
@@ -166,6 +166,56 @@ server:
 npm run dev-server
 ```
 
+#### Deploying your visualization plugin
+
+Once your plugin is complete, you will need to deploy it to your superset 
instance.
+
+This step assumes your are running your own docker image as described 
[here](https://superset.apache.org/docs/installation/docker-builds/#building-your-own-production-docker-image).
+Instructions may vary for other kinds of deployments.
+
+If you have your own superset docker image, your first line is most likely:
+`FROM apache/superset:latest` or something similar. You will need to compile
+your own `lean` image and replace this FROM line with your own image.
+
+1. publish your chart plugin to npm - it makes the build process simpler

Review Comment:
   ```suggestion
   1. Publish your chart plugin to npm: it makes the build process simpler.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to