ci: update dockerfile
Some checks failed
Checks / check (push) Has been cancelled
Build and Push Docker Image / Build and Push Image (push) Has been cancelled

This commit is contained in:
Vladimir Rubin 2024-11-28 10:23:34 +02:00
parent 71f10a0a9f
commit 92119e6679
Signed by: vavakado
GPG key ID: CAB744727F36B524
6 changed files with 16 additions and 4 deletions

3
.gitignore vendored
View file

@ -39,6 +39,3 @@ exmr-*.tar
# In case you use Node.js/npm, you want to ignore these. # In case you use Node.js/npm, you want to ignore these.
npm-debug.log npm-debug.log
/assets/node_modules/ /assets/node_modules/
# ignore release artifacts
/rel/

View file

@ -38,12 +38,14 @@ ENV MIX_ENV="prod"
COPY mix.exs mix.lock ./ COPY mix.exs mix.lock ./
RUN mix deps.get --only $MIX_ENV RUN mix deps.get --only $MIX_ENV
RUN mkdir config RUN mkdir config
RUN mkdir rel
RUN mix phx.gen.release
# copy compile-time config files before we compile dependencies # copy compile-time config files before we compile dependencies
# to ensure any relevant config change will trigger the dependencies # to ensure any relevant config change will trigger the dependencies
# to be re-compiled. # to be re-compiled.
COPY config/config.exs config/${MIX_ENV}.exs config/ COPY config/config.exs config/${MIX_ENV}.exs config/
RUN mix deps.compile RUN mix deps.compile --only $MIX_ENV
COPY priv priv COPY priv priv

5
rel/overlays/bin/migrate Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
set -eu
cd -P -- "$(dirname -- "$0")"
exec ./exmr eval Exmr.Release.migrate

1
rel/overlays/bin/migrate.bat Executable file
View file

@ -0,0 +1 @@
call "%~dp0\exmr" eval Exmr.Release.migrate

5
rel/overlays/bin/server Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
set -eu
cd -P -- "$(dirname -- "$0")"
PHX_SERVER=true exec ./exmr start

2
rel/overlays/bin/server.bat Executable file
View file

@ -0,0 +1,2 @@
set PHX_SERVER=true
call "%~dp0\exmr" start