Fix overlay & enoent error on image uploads

This commit is contained in:
prichier 2020-10-31 02:39:32 +01:00
parent 6da7d1c922
commit aa7c899b69
3 changed files with 17 additions and 11 deletions

View File

@ -21,6 +21,7 @@ RUN mix local.hex --force \
COPY lib ./lib
COPY priv ./priv
COPY config ./config
COPY rel ./rel
COPY docker/production/releases.exs ./config/
COPY --from=assets ./priv/static ./priv/static
@ -30,7 +31,7 @@ RUN mix phx.digest \
# Finally setup the app
FROM alpine
RUN apk add --no-cache openssl ncurses-libs
RUN apk add --no-cache openssl ncurses-libs file
USER nobody
EXPOSE 4000

View File

@ -35,22 +35,22 @@ Instanciate required Postgres extensions:
# CREATE EXTENSION pg_trgm;
# CREATE EXTENSION unaccent;
Then run migrations:
docker-compose run --rm mobilizon eval Mobilizon.CLI.migrate
Finally, run the application:
docker-compose up -d mobilizon
A migration will be automatically run before starting Mobilizon (can be run even if no migration is needed without incidence).
## Run a mobilizon_ctl command
docker-compose exec mobilizon mobilizon_ctl [options]
## Update the service
Pull the latest image, then run the migrations:
Pull the latest image, then update the service:
docker-compose pull mobilizon
docker-compose run --rm mobilizon eval Mobilizon.CLI.migrate
Finally, update the service:
docker-compose up -d mobilizon
Migration is automatic.

View File

@ -22,6 +22,11 @@ config :mobilizon, :instance,
email_from: System.get_env("MOBILIZON_INSTANCE_EMAIL", "noreply@mobilizon.lan"),
email_reply_to: System.get_env("MOBILIZON_REPLY_EMAIL", "noreply@mobilizon.lan")
config :mobilizon, Mobilizon.Web.Upload.Uploader.Local,
uploads: System.get_env("MOBILIZON_UPLOADS", "/app/uploads")
config :mobilizon, Mobilizon.Storage.Repo,
adapter: Ecto.Adapters.Postgres,
username: System.get_env("MOBILIZON_DATABASE_USERNAME", "username"),