-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (40 loc) · 1.22 KB
/
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
52
53
# SPDX-FileCopyrightText: 2020-2024 Technostructures
# SPDX-License-Identifier: AGPL-3.0-only
FROM bitwalker/alpine-elixir-phoenix:1.15
ENV HEX_HTTP_CONCURRENCY=1
ENV HEX_HTTP_TIMEOUT=240
ENV MIX_ENV=dev
# Cache elixir deps
# COPY ./mix.exs ./mix.lock /opt/app/
# COPY ./config /opt/app/config/
# COPY ./activity_pub /opt/app/activity_pub/
# COPY ./matrix_app_service /opt/app/matrix_app_service
# COPY ./polyjuice_client /opt/app/polyjuice_client
# RUN mix do deps.get, deps.compile
# Same with npm deps
# COPY ./assets /opt/app/assets/
# COPY ./assets/package.json /opt/app/assets/
# RUN cd assets && \
# npm install --ignore-optional
# ADD . .
# Run frontend build, compile, and digest assets
# RUN cd assets/ && \
# npm run deploy && \
# cd - && \
# mix do compile, phx.digest
# COPY ./lib /opt/app/lib/
# COPY ./priv /opt/app/priv/
# RUN mix compile
# VOLUME ["/opt/app/lib"]
# VOLUME ["/opt/app/assets"]
# VOLUME ["/opt/app/priv"]
## Add the wait script to the image
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.6.0/wait /wait
RUN chmod +x /wait
# Set exposed ports
EXPOSE 4000
# temporary fix
# RUN chmod -R 777 /opt/app/_build
# temporary fix
# USER default
CMD /wait && mix phx.server