Fix Docker setup and add back back an entrypoint

* Also add special deps for argon2 support inside the Alpine image
* Make sure yarn install is triggered

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2019-04-30 13:16:29 +02:00
parent ff7fd460f0
commit f8ed5cd779
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
5 changed files with 11 additions and 7 deletions

View file

@ -1,11 +1,10 @@
FROM bitwalker/alpine-elixir:latest
RUN apk add inotify-tools postgresql-client yarn
RUN apk add --no-cache make gcc libc-dev
RUN mix local.hex --force && mix local.rebar --force
COPY docker/entrypoint.sh /bin/entrypoint
WORKDIR /app
EXPOSE 4000 4001 4002

View file

@ -30,7 +30,7 @@ services:
MOBILIZON_DATABASE_USERNAME: postgres
MOBILIZON_DATABASE_DBNAME: mobilizon_dev
MOBILIZON_DATABASE_HOST: postgres
command: "mix phx.migrate_serve"
command: "mix phx.deps_migrate_serve"
volumes:
pgdata:
.:

View file

@ -11,7 +11,7 @@ defmodule MobilizonWeb.PageController do
action_fallback(MobilizonWeb.FallbackController)
def index(conn, _params) do
render conn, "app.html"
render(conn, "app.html")
end
def actor(conn, %{"name" => name}) do
@ -73,6 +73,6 @@ defmodule MobilizonWeb.PageController do
# Inject OpenGraph information
defp render_with_meta(conn, object) do
render conn, "app.html", object: object
render(conn, "app.html", object: object)
end
end

View file

@ -1,5 +1,4 @@
defmodule MobilizonWeb.LayoutView do
use MobilizonWeb, :view
alias Mobilizon.Service.Metadata
end

View file

@ -117,7 +117,13 @@ defmodule Mobilizon.Mixfile do
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate", "test"],
"phx.migrate_serve": ["ecto.create --quiet", "ecto.migrate", "phx.server"]
"phx.deps_migrate_serve": [
"deps.get",
"ecto.create --quiet",
"ecto.migrate",
"cmd cd js && yarn install && cd ../",
"phx.server"
]
]
end