-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.Dockerfile
More file actions
28 lines (24 loc) · 836 Bytes
/
build.Dockerfile
File metadata and controls
28 lines (24 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM samhstn_base:latest
COPY infra infra
COPY config config
COPY test test
COPY lib lib
COPY priv/static/favicon.svg priv/static/favicon.svg
COPY priv/static/script.js priv/static/script.js
COPY priv/static/style.css priv/static/style.css
COPY mix.exs mix.lock .formatter.exs ./
RUN mix deps.get
RUN MIX_ENV=test mix compile --force
# This command is very slow, we can ignore for now
# RUN MIX_ENV=test mix dialyzer
RUN MIX_ENV=test mix format --check-formatted
RUN MIX_ENV=test mix sobelow --router lib/samhstn_web/router.ex --exit --skip
RUN mix test
RUN MIX_ENV=prod mix phx.digest
RUN MIX_ENV=prod mix release
RUN zip -r samhstn.zip priv/static
RUN zip -qr samhstn.zip _build/prod/rel/samhstn
RUN zip -j samhstn.zip \
infra/samhstn/appspec.yml \
infra/samhstn/start-service.sh \
infra/samhstn/stop-service.sh