forked from midarrlabs/midarr-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (39 loc) 路 985 Bytes
/
Dockerfile
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM node:18-alpine as node
WORKDIR /assets
COPY assets/package.json assets/package-lock.json /assets/
RUN npm install
#-------------------------
FROM elixir:1.14.3-otp-24-alpine
ARG MIX_ENV="dev"
ARG SECRET_KEY_BASE=""
ENV MIX_ENV="${MIX_ENV}"
ENV SECRET_KEY_BASE="${SECRET_KEY_BASE}"
RUN MIX_ENV=$MIX_ENV
RUN SECRET_KEY_BASE=$SECRET_KEY_BASE
WORKDIR /app
COPY . ./
COPY --from=node /assets/node_modules /app/assets/node_modules/
RUN \
apk add --no-cache --virtual=.build-deps \
build-base \
&& \
apk add --no-cache \
ca-certificates \
ffmpeg \
inotify-tools \
postgresql15-client \
curl \
make \
g++ \
&& \
mix local.hex --force \
&& mix local.rebar --force \
&& mix deps.get \
&& mix deps.compile \
&& mix assets.deploy \
&& mix compile \
&& apk del --purge .build-deps \
&& rm -rf /tmp/* \
&& chmod u+x /app/entry.sh
EXPOSE 4000
CMD [ "/app/entry.sh" ]