在 dokku 中运行的 phoenix 项目中使用 sass
Using sass in a phoenix project that runs in dokku
我将 sass 添加到一个新的 phoenix 项目中。
像这样:
- 将
"sass-brunch": ">= 1.9"
添加到 package.json
- 将 app.css 重命名为 app.sass
- 删除{、}和;来自 sass 文件,并检查 以检查所有内容是否有效 sass。
它在本地工作,但是当我将项目推送到 dokku 安装时它卡在了
You need to have Sass on your system
Execute `gem install sass`
这对我来说很奇怪 - 我认为它会在 npm-install 为 运行 时安装,因为我确实在 package.json
中添加了它
然后卡在
10 Jan 15:02:11 - info: compiling
我现在的package.json
{
"repository": {
},
"dependencies": {
"babel-brunch": "^6.0.0",
"brunch": "^2.0.0",
"clean-css-brunch": ">= 1.0 < 1.8",
"css-brunch": ">= 1.0 < 1.8",
"javascript-brunch": ">= 1.0 < 1.8",
"uglify-js-brunch": ">= 1.0 < 1.8",
"sass-brunch": ">= 1.9"
},
"scripts": {
"start": "node server.js"
}
}
有什么线索吗?
我的下一步是尝试看看我是否可以登录到那个特定的应用程序并手动安装那个 gem,但一定有更好的方法吗?
现在当我尝试再次推送应用时,它卡在了那个点
remote: phoenix is currently being deployed or locked. Waiting...
:\
更新
“ Dokku 似乎通过创建一个空的隐藏文件来锁定:/home/dokku/app/.build.lock 我只是删除了这个文件,然后我能够再次部署。”
所以 ssh 进入 dokku@your-page 或 root@your-page,无论你有什么设置 - cd /home/dokku/app-name/
然后(可选:你可以先 运行 ls -la
看到 .build.lock 在那里) 运行 rm .build.lock
现在你应该可以再次推动了。)
更新
手动安装 sass gem 没有帮助。
更新
看了known issues for dokku list。我发现没有提及 sass、css 或资产。
uname -a
Linux maleficent 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
免费-m
total used free shared buffers cached
Mem: 994 885 108 21 89 111
-/+ buffers/cache: 684 309
Swap: 2047 461 1586
docker版本
Client:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64
docker -D 信息
Containers: 23
Images: 131
Server Version: 1.9.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 177
Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.13.0-71-generic
Operating System: Ubuntu 14.04.3 LTS
CPUs: 1
Total Memory: 994 MiB
Name: maleficent
ID: JD4N:6BHQ:NUG6:BLP2:VTW5:LRIH:UY35:6GEL:OXQH:2AEK:O6OO:A3SM
WARNING: No swap limit support
docker 运行 --rm -ti gliderlabs/herokuish:最新的 herokuish 版本
herokuish: 0.3.5
buildpacks:
heroku-buildpack-clojure v70
heroku-buildpack-go v18
heroku-buildpack-gradle v12
heroku-buildpack-grails v19
heroku-buildpack-java v40
heroku-buildpack-multi 26fa21a
heroku-buildpack-nodejs v86
heroku-buildpack-php v80
heroku-buildpack-play v24
heroku-buildpack-python v70
heroku-buildpack-ruby v140
heroku-buildpack-scala v63
https://github.com/dokku/buildpack-nginx v5
独库版
0.4.6
dokku 插件
00_dokku-standard 0.4.0 enabled dokku core standard plugin
20_events 0.4.0 enabled dokku core events logging plugin
apps 0.4.0 enabled dokku core apps plugin
backup 0.4.0 enabled dokku core backup plugin
build-env 0.4.0 enabled dokku core build-env plugin
certs 0.4.0 enabled dokku core certificate management plugin
checks 0.4.0 enabled dokku core checks plugin
common 0.4.0 enabled dokku core common plugin
config 0.4.0 enabled dokku core config plugin
docker-options 0.4.0 enabled dokku core docker-options plugin
domains 0.4.0 enabled dokku core domains plugin
enter 0.4.0 enabled dokku core enter plugin
git 0.4.0 enabled dokku core git plugin
logs 0.4.0 enabled dokku core logs plugin
mysql 1.0.0 enabled dokku mysql service plugin
named-containers 0.4.0.1 enabled dokku core named containers plugin
nginx-vhosts 0.4.0 enabled dokku core nginx-vhosts plugin
plugin 0.4.0 enabled dokku core plugin plugin
postgres 1.0.0 enabled dokku postgres service plugin
ps 0.4.0 enabled dokku core ps plugin
shell 0.4.0 enabled dokku core shell plugin
tags 0.4.0 enabled dokku core tags plugin
tar 0.4.0 enabled dokku core tar plugin
VPS 详细信息:1 GB 内存/30 GB 磁盘
更新
添加了交换文件。没有任何区别。
输出在此处冻结:
...
lcid@1.0.0 /tmp/build/node_modules/lcid
invert-kv@1.0.0 /tmp/build/node_modules/invert-kv
window-size@0.1.4 /tmp/build/node_modules/sass-graph/node_modules/window-size
y18n@3.2.0 /tmp/build/node_modules/y18n
progeny@0.5.2 /tmp/build/node_modules/progeny
fs-mode@1.0.1 /tmp/build/node_modules/fs-mode
cbify@1.0.0 /tmp/build/node_modules/cbify
fn-args@1.0.0 /tmp/build/node_modules/fn-args
promise@6.1.0 /tmp/build/node_modules/promise
asap@1.0.0 /tmp/build/node_modules/asap
ecc-jsbn@0.1.1 /tmp/build/node_modules/ecc-jsbn
jsbn@0.1.0 /tmp/build/node_modules/jsbn
jodid25519@1.0.2 /tmp/build/node_modules/jodid25519
tweetnacl@0.13.3 /tmp/build/node_modules/tweetnacl
npm WARN package.json @ No license field.
Running default compile
You need to have Sass on your system
Execute `gem install sass`
11 Jan 20:49:49 - info: compiling
已解决,有点乱,但有效!
添加 Gemfile
source 'https://rubygems.org'
ruby '2.3.1'
gem 'sass'
运行
bundle install
(生成Gemfile.lock)。
(gem install bundler
,以访问捆绑包)
将 ruby buildpack 添加到 buildpacks:
在文件 .buildpacks 中添加
https://github.com/heroku/heroku-buildpack-ruby
...在文件顶部 (!)
保存,推送,成功! :D 快乐的舞蹈
有帮助:https://github.com/gjaldon/heroku-buildpack-phoenix-static
我将 sass 添加到一个新的 phoenix 项目中。
像这样:
- 将
"sass-brunch": ">= 1.9"
添加到 package.json - 将 app.css 重命名为 app.sass
- 删除{、}和;来自 sass 文件,并检查 以检查所有内容是否有效 sass。
它在本地工作,但是当我将项目推送到 dokku 安装时它卡在了
You need to have Sass on your system
Execute `gem install sass`
这对我来说很奇怪 - 我认为它会在 npm-install 为 运行 时安装,因为我确实在 package.json
中添加了它然后卡在
10 Jan 15:02:11 - info: compiling
我现在的package.json
{
"repository": {
},
"dependencies": {
"babel-brunch": "^6.0.0",
"brunch": "^2.0.0",
"clean-css-brunch": ">= 1.0 < 1.8",
"css-brunch": ">= 1.0 < 1.8",
"javascript-brunch": ">= 1.0 < 1.8",
"uglify-js-brunch": ">= 1.0 < 1.8",
"sass-brunch": ">= 1.9"
},
"scripts": {
"start": "node server.js"
}
}
有什么线索吗? 我的下一步是尝试看看我是否可以登录到那个特定的应用程序并手动安装那个 gem,但一定有更好的方法吗?
现在当我尝试再次推送应用时,它卡在了那个点
remote: phoenix is currently being deployed or locked. Waiting...
:\
更新
“ Dokku 似乎通过创建一个空的隐藏文件来锁定:/home/dokku/app/.build.lock 我只是删除了这个文件,然后我能够再次部署。”
所以 ssh 进入 dokku@your-page 或 root@your-page,无论你有什么设置 - cd /home/dokku/app-name/
然后(可选:你可以先 运行 ls -la
看到 .build.lock 在那里) 运行 rm .build.lock
现在你应该可以再次推动了。)
更新
手动安装 sass gem 没有帮助。
更新
看了known issues for dokku list。我发现没有提及 sass、css 或资产。
uname -a
Linux maleficent 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
免费-m
total used free shared buffers cached
Mem: 994 885 108 21 89 111
-/+ buffers/cache: 684 309
Swap: 2047 461 1586
docker版本
Client:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64
docker -D 信息
Containers: 23
Images: 131
Server Version: 1.9.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 177
Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.13.0-71-generic
Operating System: Ubuntu 14.04.3 LTS
CPUs: 1
Total Memory: 994 MiB
Name: maleficent
ID: JD4N:6BHQ:NUG6:BLP2:VTW5:LRIH:UY35:6GEL:OXQH:2AEK:O6OO:A3SM
WARNING: No swap limit support
docker 运行 --rm -ti gliderlabs/herokuish:最新的 herokuish 版本
herokuish: 0.3.5
buildpacks:
heroku-buildpack-clojure v70
heroku-buildpack-go v18
heroku-buildpack-gradle v12
heroku-buildpack-grails v19
heroku-buildpack-java v40
heroku-buildpack-multi 26fa21a
heroku-buildpack-nodejs v86
heroku-buildpack-php v80
heroku-buildpack-play v24
heroku-buildpack-python v70
heroku-buildpack-ruby v140
heroku-buildpack-scala v63
https://github.com/dokku/buildpack-nginx v5
独库版
0.4.6
dokku 插件
00_dokku-standard 0.4.0 enabled dokku core standard plugin
20_events 0.4.0 enabled dokku core events logging plugin
apps 0.4.0 enabled dokku core apps plugin
backup 0.4.0 enabled dokku core backup plugin
build-env 0.4.0 enabled dokku core build-env plugin
certs 0.4.0 enabled dokku core certificate management plugin
checks 0.4.0 enabled dokku core checks plugin
common 0.4.0 enabled dokku core common plugin
config 0.4.0 enabled dokku core config plugin
docker-options 0.4.0 enabled dokku core docker-options plugin
domains 0.4.0 enabled dokku core domains plugin
enter 0.4.0 enabled dokku core enter plugin
git 0.4.0 enabled dokku core git plugin
logs 0.4.0 enabled dokku core logs plugin
mysql 1.0.0 enabled dokku mysql service plugin
named-containers 0.4.0.1 enabled dokku core named containers plugin
nginx-vhosts 0.4.0 enabled dokku core nginx-vhosts plugin
plugin 0.4.0 enabled dokku core plugin plugin
postgres 1.0.0 enabled dokku postgres service plugin
ps 0.4.0 enabled dokku core ps plugin
shell 0.4.0 enabled dokku core shell plugin
tags 0.4.0 enabled dokku core tags plugin
tar 0.4.0 enabled dokku core tar plugin
VPS 详细信息:1 GB 内存/30 GB 磁盘
更新 添加了交换文件。没有任何区别。 输出在此处冻结:
...
lcid@1.0.0 /tmp/build/node_modules/lcid
invert-kv@1.0.0 /tmp/build/node_modules/invert-kv
window-size@0.1.4 /tmp/build/node_modules/sass-graph/node_modules/window-size
y18n@3.2.0 /tmp/build/node_modules/y18n
progeny@0.5.2 /tmp/build/node_modules/progeny
fs-mode@1.0.1 /tmp/build/node_modules/fs-mode
cbify@1.0.0 /tmp/build/node_modules/cbify
fn-args@1.0.0 /tmp/build/node_modules/fn-args
promise@6.1.0 /tmp/build/node_modules/promise
asap@1.0.0 /tmp/build/node_modules/asap
ecc-jsbn@0.1.1 /tmp/build/node_modules/ecc-jsbn
jsbn@0.1.0 /tmp/build/node_modules/jsbn
jodid25519@1.0.2 /tmp/build/node_modules/jodid25519
tweetnacl@0.13.3 /tmp/build/node_modules/tweetnacl
npm WARN package.json @ No license field.
Running default compile
You need to have Sass on your system
Execute `gem install sass`
11 Jan 20:49:49 - info: compiling
已解决,有点乱,但有效!
添加 Gemfile
source 'https://rubygems.org'
ruby '2.3.1'
gem 'sass'
运行
bundle install
(生成Gemfile.lock)。
(gem install bundler
,以访问捆绑包)
将 ruby buildpack 添加到 buildpacks: 在文件 .buildpacks 中添加
https://github.com/heroku/heroku-buildpack-ruby
...在文件顶部 (!)
保存,推送,成功! :D 快乐的舞蹈
有帮助:https://github.com/gjaldon/heroku-buildpack-phoenix-static