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:
parent
ff7fd460f0
commit
f8ed5cd779
@ -1,11 +1,10 @@
|
|||||||
FROM bitwalker/alpine-elixir:latest
|
FROM bitwalker/alpine-elixir:latest
|
||||||
|
|
||||||
RUN apk add inotify-tools postgresql-client yarn
|
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
|
RUN mix local.hex --force && mix local.rebar --force
|
||||||
|
|
||||||
COPY docker/entrypoint.sh /bin/entrypoint
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
EXPOSE 4000 4001 4002
|
EXPOSE 4000 4001 4002
|
||||||
|
@ -30,7 +30,7 @@ services:
|
|||||||
MOBILIZON_DATABASE_USERNAME: postgres
|
MOBILIZON_DATABASE_USERNAME: postgres
|
||||||
MOBILIZON_DATABASE_DBNAME: mobilizon_dev
|
MOBILIZON_DATABASE_DBNAME: mobilizon_dev
|
||||||
MOBILIZON_DATABASE_HOST: postgres
|
MOBILIZON_DATABASE_HOST: postgres
|
||||||
command: "mix phx.migrate_serve"
|
command: "mix phx.deps_migrate_serve"
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
.:
|
.:
|
||||||
|
@ -11,7 +11,7 @@ defmodule MobilizonWeb.PageController do
|
|||||||
action_fallback(MobilizonWeb.FallbackController)
|
action_fallback(MobilizonWeb.FallbackController)
|
||||||
|
|
||||||
def index(conn, _params) do
|
def index(conn, _params) do
|
||||||
render conn, "app.html"
|
render(conn, "app.html")
|
||||||
end
|
end
|
||||||
|
|
||||||
def actor(conn, %{"name" => name}) do
|
def actor(conn, %{"name" => name}) do
|
||||||
@ -73,6 +73,6 @@ defmodule MobilizonWeb.PageController do
|
|||||||
|
|
||||||
# Inject OpenGraph information
|
# Inject OpenGraph information
|
||||||
defp render_with_meta(conn, object) do
|
defp render_with_meta(conn, object) do
|
||||||
render conn, "app.html", object: object
|
render(conn, "app.html", object: object)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
defmodule MobilizonWeb.LayoutView do
|
defmodule MobilizonWeb.LayoutView do
|
||||||
use MobilizonWeb, :view
|
use MobilizonWeb, :view
|
||||||
alias Mobilizon.Service.Metadata
|
alias Mobilizon.Service.Metadata
|
||||||
|
|
||||||
end
|
end
|
||||||
|
8
mix.exs
8
mix.exs
@ -117,7 +117,13 @@ defmodule Mobilizon.Mixfile do
|
|||||||
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
|
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
|
||||||
"ecto.reset": ["ecto.drop", "ecto.setup"],
|
"ecto.reset": ["ecto.drop", "ecto.setup"],
|
||||||
test: ["ecto.create --quiet", "ecto.migrate", "test"],
|
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
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user