国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

CentOS7下使用docker-compose安裝部署superset

這篇具有很好參考價值的文章主要介紹了CentOS7下使用docker-compose安裝部署superset。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。


一、安裝 docker、docker-compose

見 docker在CentOS下安裝 和 Docker-compose安裝。

二、下載

git clone https://github.com/apache/superset.git
cd superset

官網(wǎng)指引:
https://superset.apache.org/docs/installation/installing-superset-using-docker-compose

三、修改 superset 配置文件

1.修改 docker-compose-non-dev.yml

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
x-superset-image: &superset-image apache/superset:${TAG:-latest-dev}
x-superset-depends-on: &superset-depends-on
#  - db
  - redis
x-superset-volumes: &superset-volumes
  # /app/pythonpath_docker will be appended to the PYTHONPATH in the final container
  - ./docker:/app/docker
  - superset_home:/app/superset_home

version: "3.7"
services:
  redis:
    image: redis:7
    container_name: superset_cache
    restart: unless-stopped
    volumes:
      - redis:/data

#  db:
#    env_file: docker/.env-non-dev
#    image: postgres:14
#    container_name: superset_db
#    restart: unless-stopped
#    volumes:
#      - db_home:/var/lib/postgresql/data

  superset:
    env_file: docker/.env-non-dev
    image: *superset-image
    container_name: superset_app
    command: ["/app/docker/docker-bootstrap.sh", "app-gunicorn"]
    user: "root"
    restart: unless-stopped
    ports:
      - 8088:8088
    depends_on: *superset-depends-on
    volumes: *superset-volumes

  superset-init:
    image: *superset-image
    container_name: superset_init
    command: ["/app/docker/docker-init.sh"]
    env_file: docker/.env-non-dev
    depends_on: *superset-depends-on
    user: "root"
    volumes: *superset-volumes
    healthcheck:
      disable: true

  superset-worker:
    image: *superset-image
    container_name: superset_worker
    command: ["/app/docker/docker-bootstrap.sh", "worker"]
    env_file: docker/.env-non-dev
    restart: unless-stopped
    depends_on: *superset-depends-on
    user: "root"
    volumes: *superset-volumes
    healthcheck:
      test: ["CMD-SHELL", "celery -A superset.tasks.celery_app:app inspect ping -d celery@$$HOSTNAME"]

  superset-worker-beat:
    image: *superset-image
    container_name: superset_worker_beat
    command: ["/app/docker/docker-bootstrap.sh", "beat"]
    env_file: docker/.env-non-dev
    restart: unless-stopped
    depends_on: *superset-depends-on
    user: "root"
    volumes: *superset-volumes
    healthcheck:
      disable: true

volumes:
  superset_home:
    external: false
#  db_home:
#    external: false
  redis:
    external: false

注:此處使用自己搭建的 mysql 作為數(shù)據(jù)的存儲

2.修改 .env-non-dev

該文件在 ./superset/docker 目錄下,使用 ls -a 進(jìn)行查看該隱藏文件

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
COMPOSE_PROJECT_NAME=superset

# database configurations (do not modify)
DATABASE_DB=superset
DATABASE_HOST=192.168.1.xx
DATABASE_PASSWORD=superset
DATABASE_USER=superset

# database engine specific environment variables
# change the below if you prefer another database engine
#DATABASE_PORT=5432
DATABASE_PORT=3306
#DATABASE_DIALECT=postgresql
DATABASE_DIALECT=mysql
#POSTGRES_DB=superset
#POSTGRES_USER=superset
#POSTGRES_PASSWORD=superset
MYSQL_DATABASE=superset
MYSQL_USER=superset
MYSQL_PASSWORD=superset
MYSQL_RANDOM_ROOT_PASSWORD=yes

# Add the mapped in /app/pythonpath_docker which allows devs to override stuff
PYTHONPATH=/app/pythonpath:/app/docker/pythonpath_dev
REDIS_HOST=redis
REDIS_PORT=6379

FLASK_ENV=production
SUPERSET_ENV=production
SUPERSET_LOAD_EXAMPLES=yes
SUPERSET_SECRET_KEY=TEST_NON_DEV_SECRET
CYPRESS_CONFIG=false
SUPERSET_PORT=8088
MAPBOX_API_KEY=''

注:
1、增加自行搭建的 mysql 地址、賬號和密碼,注釋掉 pg。
2、redis 改為自行搭建 redis 時會出現(xiàn)無法連接 redis 的錯誤,筆者還找不到原因,所以仍然使用系統(tǒng)默認(rèn)配置的 redis。

四、創(chuàng)建數(shù)據(jù)庫及數(shù)據(jù)庫用戶

CREATE USER superset IDENTIFIED BY 'superset';
GRANT ALL PRIVILEGES ON *.* TO 'superset'@'%' ;
CREATE DATABASE superset DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

五、啟動

docker-compose -f docker-compose-non-dev.yml up -d

啟動時可能會報錯:

Error response from daemon: oci runtime error: container_linux.go:290: starting container process caused "exec: \"/app/docker/docker-bootstrap.sh\": permission denied"

解決方法:

cd ./docker
chmod 777 *.sh

使用高版本 docker-compose 可能會報錯:

unexpected character "(" in variable name 

換為低版本就可以了。我這里將版本從 2.18.1 降為 1.29.2。

六、訪問

http://IP:8088/superset/
用戶密碼:admin
密碼:admin

七、漢化

docker cp superset_app:/app/superset/config.py /root
vi config.py
# Setup default language
BABEL_DEFAULT_LOCALE = "zh"
# Your application default translation path
BABEL_DEFAULT_FOLDER = "superset/translations"
# The allowed translation for you app
LANGUAGES = {
    "en": {"flag": "us", "name": "English"},
    "es": {"flag": "es", "name": "Spanish"},
    "it": {"flag": "it", "name": "Italian"},
    "fr": {"flag": "fr", "name": "French"},
    "zh": {"flag": "cn", "name": "Chinese"},
    "ja": {"flag": "jp", "name": "Japanese"},
    "de": {"flag": "de", "name": "German"},
    "pt": {"flag": "pt", "name": "Portuguese"},
    "pt_BR": {"flag": "br", "name": "Brazilian Portuguese"},
    "ru": {"flag": "ru", "name": "Russian"},
    "ko": {"flag": "kr", "name": "Korean"},
    "sk": {"flag": "sk", "name": "Slovak"},
    "sl": {"flag": "si", "name": "Slovenian"},
    "nl": {"flag": "nl", "name": "Dutch"},
}
# Turning off i18n by default as translation in most languages are
# incomplete and not well maintained.
#LANGUAGES = {}

重點是設(shè)置:
BABEL_DEFAULT_LOCALE = “zh”
和屏蔽(不屏蔽默認(rèn)關(guān)閉國際化多語言服務(wù)):
#LANGUAGES = {}

將文件拷貝回容器:

docker cp /root/config.py superset_app:/app/superset/config.py

進(jìn)入容器:

docker exec -it --user root superset_app /bin/bash

編譯messages.po文件:

cd superset
pybabel compile -d translations

退出,重啟 superset:
docker restart ce87640911d6(superset-app 的 容器 id)

八、免登錄配置

docker cp superset_app:/app/superset/config.py /root
vi config.py

修改:

WTF_CSRF_ENABLED = False
HTTP_HEADERS: Dict[str, Any] = {}
PUBLIC_ROLE_LIKE: Optional[str] = "Gamma"

將文件拷貝回容器:

docker cp /root/config.py superset_app:/app/superset/config.py

進(jìn)入容器:

docker exec -it --user root superset_app /bin/bash

執(zhí)行:文章來源地址http://www.zghlxwxcb.cn/news/detail-458299.html

superset init

到了這里,關(guān)于CentOS7下使用docker-compose安裝部署superset的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • centos7使用docker compose部署ELK

    centos7使用docker compose部署ELK

    說明:1、一定要先不要配置那么多配置文件,去除掉一些,先讓docker compose啟動相關(guān)服務(wù)能訪問的時候,使用拷貝方法,把相關(guān)的配置文件拷貝出來在外面修改,這樣保險一些,不然容易配置文件錯誤無法啟動問題 ?2、作者測試ELK版本(7.6.2)是可以通過下面步驟配置成功,

    2024年02月07日
    瀏覽(27)
  • 如何在CentOS使用docker-compose部署Apache Superset并實現(xiàn)公網(wǎng)訪問

    如何在CentOS使用docker-compose部署Apache Superset并實現(xiàn)公網(wǎng)訪問

    Superset是一款由中國知名科技公司開源的“現(xiàn)代化的企業(yè)級BI(商業(yè)智能)Web應(yīng)用程序”,其通過創(chuàng)建和分享dashboard,為數(shù)據(jù)分析提供了輕量級的數(shù)據(jù)查詢和可視化方案。Superset在數(shù)據(jù)處理和可視化方面具有強(qiáng)大的功能,能夠滿足企業(yè)級的數(shù)據(jù)分析需求,并為用戶提供直觀、靈

    2024年01月25日
    瀏覽(28)
  • Centos 7 部署Docker CE和docker-compose教程

    ①、安裝依賴包 ②、設(shè)置yum源 ③、生成并更新系統(tǒng)中的軟件包緩存 ④、安裝、啟動、并設(shè)置Docker開機(jī)自啟 Docker 啟動命令 Docker 容器命令 Docker 鏡像命令 可選。Docker 官方提供的默認(rèn)鏡像源位于海外,可能下載會很慢,可以通過配置國內(nèi)的鏡像源,加速下載。 ①、使用文本編

    2024年02月07日
    瀏覽(23)
  • centos安裝docker-compose

    centos安裝docker-compose

    docker compose是用于定義和運行多容器docker應(yīng)用程序的工具,compose 通過一個配置文件來管理多個docker容器??梢允褂胐ocker-compose.yml腳本來啟動、停止、重啟應(yīng)用,進(jìn)行docker容器的編排和管理。但是docker compose并沒有實現(xiàn)容器的負(fù)載均衡,還需要借助其他工具實現(xiàn)。 docker官網(wǎng)地址

    2024年02月13日
    瀏覽(24)
  • 【Docker】Centos安裝docker-compose

    【Docker】Centos安裝docker-compose

    直接從GitHub下載docker到本地的/usr/local/bin/目錄下,賦予讀寫權(quán)限,檢查,就可以使用了; 下載鏈接 https://github.com/docker/compose/releases/

    2024年02月13日
    瀏覽(27)
  • CentOS 安裝 docker 以及 docker-compose

    系統(tǒng):CentOS? docker官網(wǎng):Install Docker Engine on CentOS | Docker Documentation ##卸載之前的docker(有則卸載) sudo yum remove docker ? ? ? ? ? ? ? ? ? docker-client ? ? ? ? ? ? ? ? ? docker-client-latest ? ? ? ? ? ? ? ? ? docker-common ? ? ? ? ? ? ? ? ? docker-latest ? ? ? ? ? ? ? ? ?

    2024年02月07日
    瀏覽(57)
  • CentOS上安裝docker-compose

    CentOS上安裝docker-compose

    簡介 docker compose是用于定義和運行多容器docker應(yīng)用程序的工具,compose 通過一個配置文件來管理多個docker容器??梢允褂胐ocker-compose.yml腳本來啟動、停止、重啟應(yīng)用,進(jìn)行docker容器的編排和管理。但是docker compose并沒有實現(xiàn)容器的負(fù)載均衡,還需要借助其他工具實現(xiàn)。 安裝 do

    2024年02月14日
    瀏覽(23)
  • Centos安裝指定docker版本和docker-compose

    Centos安裝指定docker版本和docker-compose

    目錄 一. 直接安裝Docker最新鏡像源 1. 卸載舊版本的Docker: 2. 安裝依賴包: 3. 添加Docker源: 4. 安裝Docker: 5. 啟動Docker服務(wù): 6. 驗證Docker是否安裝成功: 二、指定Docker版本安裝? 1. 查看yum源支持的docker版本 ?2.?安裝指定版本Docker (以19.03.9-3.el7為例) 3. 查看docker版本 三、卸

    2024年02月15日
    瀏覽(57)
  • centos和Ubuntu在線安裝docker、docker-compose

    1.1、設(shè)置倉庫、yum更新、在線安裝 1.2 開啟服務(wù) 1.3 docker服務(wù)加入啟動項,雖系統(tǒng)啟動: 1.4 查看是否加入成功 顯示:docker.service enabled,則設(shè)置自啟成功。 1.5、查看docker存儲目錄 默認(rèn)位置:/var/lib/docker,后續(xù)鏡像和容器的相關(guān)文件都會存儲在這。 如果掛盤,不想放默認(rèn)位置

    2024年02月13日
    瀏覽(41)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包