From 273236f9e1258793ea3deee040bc479e546b257d Mon Sep 17 00:00:00 2001 From: Ville Brofeldt Date: Fri, 28 Jan 2022 13:06:44 +0200 Subject: [PATCH] feat(docker-compose): add TAG option --- docker-compose-non-dev.yml | 2 +- docker-compose.yml | 2 +- .../connecting-to-databases/docker-add-drivers.mdx | 1 + .../installing-superset-using-docker-compose.mdx | 13 ++++++++++++- docs/src/pages/docs/installation/index.mdx | 9 ++++++++- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/docker-compose-non-dev.yml b/docker-compose-non-dev.yml index 84bbc3b7a8e5..934349667709 100644 --- a/docker-compose-non-dev.yml +++ b/docker-compose-non-dev.yml @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -x-superset-image: &superset-image apache/superset:latest-dev +x-superset-image: &superset-image apache/superset:${TAG:-latest-dev} x-superset-depends-on: &superset-depends-on - db - redis diff --git a/docker-compose.yml b/docker-compose.yml index 3131d2384a76..b7bf745ad6ff 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -x-superset-image: &superset-image apache/superset:latest-dev +x-superset-image: &superset-image apache/superset:${TAG:-latest-dev} x-superset-user: &superset-user root x-superset-depends-on: &superset-depends-on - db diff --git a/docs-v2/docs/connecting-to-databases/docker-add-drivers.mdx b/docs-v2/docs/connecting-to-databases/docker-add-drivers.mdx index 87036235beac..725a6e671c5b 100644 --- a/docs-v2/docs/connecting-to-databases/docker-add-drivers.mdx +++ b/docs-v2/docs/connecting-to-databases/docker-add-drivers.mdx @@ -62,6 +62,7 @@ docker-compose up The other option is to start Superset via Docker Compose is using the recipe in `docker-compose-non-dev.yml`, which will use pre-built frontend assets and skip the building of front-end assets: ``` +docker-compose -f docker-compose-non-dev.yml pull docker-compose -f docker-compose-non-dev.yml up ``` diff --git a/docs-v2/docs/installation/installing-superset-using-docker-compose.mdx b/docs-v2/docs/installation/installing-superset-using-docker-compose.mdx index d745a38b8f8b..4d7056a165d8 100644 --- a/docs-v2/docs/installation/installing-superset-using-docker-compose.mdx +++ b/docs-v2/docs/installation/installing-superset-using-docker-compose.mdx @@ -58,12 +58,23 @@ Navigate to the folder you created in step 1: $ cd superset ``` -Then, run the following command: +When working on master branch, run the following commands: ```bash +$ docker-compose -f docker-compose-non-dev.yml pull $ docker-compose -f docker-compose-non-dev.yml up ``` +Alternatively, you can also run a specific version of Superset by first checking out +the branch/tag, and then starting `docker-compose` with the `TAG` variable. +For example, to run the 1.4.0 version, run the following commands: + +```bash +% git checkout 1.4.0 +$ TAG=1.4.0 docker-compose -f docker-compose-non-dev.yml pull +$ TAG=1.4.0 docker-compose -f docker-compose-non-dev.yml up +``` + You should see a wall of logging output from the containers being launched on your machine. Once this output slows, you should have a running instance of Superset on your local machine! diff --git a/docs/src/pages/docs/installation/index.mdx b/docs/src/pages/docs/installation/index.mdx index 83ae7ca80805..50c547ff0328 100644 --- a/docs/src/pages/docs/installation/index.mdx +++ b/docs/src/pages/docs/installation/index.mdx @@ -64,10 +64,17 @@ Then, run the following commands: ```bash $ docker-compose -f docker-compose-non-dev.yml pull +$ docker-compose -f docker-compose-non-dev.yml up ``` +Alternatively, you can also run a specific version of Superset by first checking out +the branch/tag, and then starting `docker-compose` with the `TAG` variable. +For example, to run the 1.4.0 version, run the following commands: + ```bash -$ docker-compose -f docker-compose-non-dev.yml up +% git checkout 1.4.0 +$ TAG=1.4.0 docker-compose -f docker-compose-non-dev.yml pull +$ TAG=1.4.0 docker-compose -f docker-compose-non-dev.yml up ``` You should see a wall of logging output from the containers being launched on your machine. Once