小编Loa*_*...的帖子

How do I run Elixir Phoenix Docker in production mode using example from Phoenix Guides?

The example Dockerfile given on the Elixir Phoenix Guides appears to be outdated and broken. The example is found here: https://hexdocs.pm/phoenix/releases.html#containers

I created a vanilla application like like so: mix phx.new hello_world

The broken Dockerfile:

# FROM elixir:1.9.0-alpine as build

# install build dependencies
RUN apk add --update git build-base nodejs yarn python

# prepare build dir
RUN mkdir /app
WORKDIR /app

# install hex + rebar
RUN mix local.hex --force && \
    mix local.rebar --force

# set build ENV …
Run Code Online (Sandbox Code Playgroud)

elixir docker phoenix-framework dockerfile

6
推荐指数
1
解决办法
465
查看次数

When should I generate a mix umbrella vs a phoenix umbrella?

I'm not sure when to use mix and when to use phoenix for creating umbrella applications.

I have read a lot of articles online but they are not clear of the reasoning for using mix over phoenix and vis versa.

mix gives:

- apps/
- config/
Run Code Online (Sandbox Code Playgroud)

phoenix gives:

- build/dev/(consolidated/lib)
- apps/(app_name/app_name_web)
- config/(configs for different envs)
- deps/(stuffffff)
Run Code Online (Sandbox Code Playgroud)

mix new [UMBRELLA NAME] --umbrella VS mix phx.new [UMBRELLA NAME] --umbrella

If I want to generate an umbrella that has an …

elixir-mix elixir phoenix-framework umbrella

5
推荐指数
1
解决办法
139
查看次数

获取 IEx 中所有 Elixir 模块的列表

要获取 IEx 中模块上所有函数的列表,我可以运行:


Map.__info__(:functions)
# or
Enum.__info__(:functions)


Run Code Online (Sandbox Code Playgroud)

使用{Module}.__info__(:functions)格式。

如何获取所有标准库模块的列表?

elixir elixir-iex

5
推荐指数
2
解决办法
1915
查看次数

带有 Dragula 的多个容器,但将项目限制在它们的容器中

我有一个包含多个 Dragula 容器的页面。容器中ul有一堆li。我希望用户能够li在他们的容器中重新排序's,但我不希望lifrom 一个容器可以拖动到另一个容器。现在我可以将 each 拖到liany ul。如何将li's限制为仅使用其原始容器?

html:

<ul id="first">
  <li>for first group only</li>
  <li>for first group only</li>
  <li>for first group only</li>
</ul>

<ul id="second">
  <li>for second group only</li>
  <li>for second group only</li>
  <li>for second group only</li>
</ul>

<ul id="third">
  <li>for third group only</li>
  <li>for third group only</li>
  <li>for third group only</li>
</ul>
Run Code Online (Sandbox Code Playgroud)

js:

var first = '#first';
var second = '#second';
var third = '#third';

var …
Run Code Online (Sandbox Code Playgroud)

javascript dragula

4
推荐指数
1
解决办法
3577
查看次数

在没有jinterface的情况下使用asdf安装erlang

我正在尝试使用asdf安装Erlang(及更高版本的Elixir),但是jinterface由于安装过程似乎冻结而出现错误:

?  ~ asdf install erlang 22.1.1
Downloading OTP-22.1.1.tar.gz to /Users/me/.asdf/plugins/erlang/kerl-home/archives
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   122    0   122    0     0    320      0 --:--:-- --:--:-- --:--:--   321
100 52.4M    0 52.4M    0     0  7604k      0 --:--:--  0:00:07 --:--:-- 9203k
Extracting source code
Building Erlang/OTP 22.1.1 (asdf_22.1.1), please wait...
APPLICATIONS DISABLED (See: /Users/me/.asdf/plugins/erlang/kerl-home/builds/asdf_22.1.1/otp_build_22.1.1.log)
 * jinterface     : Java compiler disabled by user

DOCUMENTATION INFORMATION (See: /Users/me/.asdf/plugins/erlang/kerl-home/builds/asdf_22.1.1/otp_build_22.1.1.log) …
Run Code Online (Sandbox Code Playgroud)

java erlang javac asdf elixir

2
推荐指数
1
解决办法
66
查看次数