redash

https://redash.io/help/
1.Developer Guide
https://redash.io/help/open-source/dev-guide/
2.Docker Based Developer Installation Guide
https://redash.io/help/open-source/dev-guide/docker
3.Setting up a Redash Instance
https://redash.io/help/open-source/setup

基于Docker的开发安装指导
Docker ——>Docker Compose——>Node.js的安装——>Clone the Git repository——>Create Docker Services——>Install npm Packages——>Create Database——>Usage(Run webpack Dev Server、Restarting Celery Workers、Installing new Python packages (requirements.txt)、Running Tests、Configuration)
一、Docker的安装
参考:https://segmentfault.com/a/1190000014066388?utm_source=tag-newest

二、Docker Compose的安装
参考:https://segmentfault.com/a/1190000007597694

问题:ubuntu上安装docker-compose遇到Permission denied问题
解决:执行sudo -i,提示输入用户密码,输入密码后进入超级用户(root)模式,重新执行上述命令,一切正常
参考:https://blog.csdn.net/kindroid/article/details/52094484?locationNum=2&fps=1

三、安装最新版nodejs
参考:https://blog.csdn.net/well2049/article/details/79138045
PAA安装:Ubuntu环境下安装nodejs和npm
参考:https://blog.csdn.net/wangtaoking1/article/details/78005038

nodejs npm常用命令:
https://blog.csdn.net/pengpegv5yaya/article/details/51912321

问题:nodejs版本问题
nodejs -v(PAA安装)
node -v(apt安装)

nodejs的卸载:
sudo apt-get remove --purge nodejs

四、Clone the Git repository
参考:https://redash.io/help/open-source/dev-guide/docker
问题:Permission denied (publickey). fatal: Could not read from remote repository
解决:https://www.cnblogs.com/wmr95/p/7852832.html
Github登录:https://github.com/settings/keys
五、webpack的安装
注意:webpack3和webpack4的区别
升级至webpack4会出现很多错误,建议使用webpack3

注意:全局安装与本地安装的区别
https://www.cnblogs.com/PeunZhang/p/5629329.html
全局安装:npm install webpack -g
参数-g的含义是代表安装到全局环境里面,包安装在Node安装目录下的node_modules文件夹中
本地安装:npm install webpack 或 npm install webpack --save-dev等
参数–save-dev的含义是代表把你的安装包信息写入package.json文件的devDependencies字段中,包安装在指定项目的node_modules文件夹下。

全局安装
npm install [email protected] -g
在当前项目的根目录里面也安装一个webpack
npm install [email protected] --save-dev
这样就可以在你的webpack.config.js里面方便的引用webpack
六、webpack-dev-server的安装
全局安装
npm install webpack-dev-server -g
本地安装
npm install webpack-dev-server --save-dev
七、Create Docker Services
docker-compose up

八、Install npm Packages
npm install

问题:Cannot find module '/root/redash/node_modules/uglifyjs-webpack-plugin/lib/postinstallwebpack安装出现uglifyjs-webpack-plugin postinstall的错误
解决:https://zhidao.baidu.com/question/1929987072049389427.html

九、Create Database
创建tables
docker-compose run --rm server create_db
创建database
docker-compose run --rm postgres psql -h postgres -U postgres -c “create database tests”

十、Run webpack Dev Server
方法一:
all Docker services are running (can be started either by docker-compose up or docker-compose start)
Redash is available at http://localhost:5000/
方法二:
use webpack’s dev server
(npm run build和npm run start)
the dev server is available at http://localhost:8080
All the API calls are proxied to localhost:5000 (the server running in Docker).

问题:[HPM] Error occurred while trying to proxy request /api/session from localhost
解决:https://nodejs.org/api/errors.html#errors_common_system_errors
ECONNREFUSED (Connection refused): No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host.
https://nodejs.org/api/errors.html#errors_common_system_errors

你可能感兴趣的:(project)