Tag: phoenix framework

如何通过容器使用PostgeSQL来启动Phoenix?

我试过了: $ alias psql="docker exec -ti pg-hello-phoenix sh -c 'exec psql -h localhost -p 5432 -U postgres'" $ mix ecto.create 但得到: **(RuntimeError)在path中找不到可执行的psql ,请确保它在运行ecto命令之前是可用的lib / ecto / adapters / postgres.ex:106:Ecto.Adapters.Postgres.run_with_psql / 2 lib / ecto / adapters / postgres .ex:83:Ecto.Adapters.Postgres.storage_up / 1 lib / mix / tasks / ecto.create.ex:34:匿名fn / 2在Mix.Tasks.Ecto.Create.run/1(elixir)lib / enum .ex:604:Enum。“ – each […]

将Dockerized应用程序连接到本地Redis和Postgresql

我想通过一些教程和指南在Docker上设置我的项目。 我设置Elixir / Phoenix应用程序,它有Redis和Postgresql,因为它是依赖项。 我设法使用docker撰写Dockerize,它使用pg和Redis的图片。 我试图找出一种方法来连接我的凤凰应用程序到我的本地Postgresql和Redis,而不是连接到他们的图像,因为分贝和Redis需要在服务器上,而不是在docker集装箱。 有没有人可以帮助我的例子? 提前致谢。

如何debugging与docker运行的Elixir应用程序?

用这种方法可以debugging: require IEx; defmodule Example do def double_sum(x, y) do IEx.pry hard_work(x, y) end defp hard_work(x, y) do 2 * (x + y) end end 但是,如果在Docker中使用其他microservices (如db,cache,worker等)通过docker-compose运行程序,它甚至不会停止设置breakpoint 。

Docker错误:standard_init_linux.go:185:exec用户进程导致“没有这样的文件或目录”

我试图用postgresql数据库设置我的elixir-phoenix应用程序来运行Docker。 这是我的Dockerfile的样子: # ./Dockerfile # Starting from the official Elixir 1.5.2 image: # https://hub.docker.com/_/elixir/ FROM elixir:1.5.2 ENV DEBIAN_FRONTEND=noninteractive # Install hex RUN mix local.hex # Install rebar RUN mix local.rebar # Install the Phoenix framework itself RUN mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez # Install NodeJS 6.x and the NPM RUN curl -sL https://deb.nodesource.com/setup_6.x | bash – RUN […]

泊坞窗撰写链接似乎不起作用

我正在使用Docker Compose在开发中运行Elixir / Phoenix应用程序。 这个设置非常标准,有一个postgres容器和一个web容器。 但是,我很难让Web容器与数据库容器交谈。 这是我的Web容器Dockerfile : FROM ubuntu:14.04 MAINTAINER me@example.com RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 ENV DEBIAN_FRONTEND noninteractive RUN apt-get update RUN apt-get install -y wget RUN apt-get install -y curl RUN apt-get install -y inotify-tools RUN apt-get install -y postgresql-client RUN wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \ && […]