Create docker.exs and docker-entrypoint + round out Dockerfile
At this point, the implementation is completely working and has been tested running live and federating with other instances.
This commit is contained in:
parent
7efca4317b
commit
4a418698db
3 changed files with 97 additions and 7 deletions
23
Dockerfile
23
Dockerfile
|
|
@ -2,7 +2,7 @@ FROM rinpatch/elixir:1.9.0-rc.0-alpine as build
|
|||
|
||||
COPY . .
|
||||
|
||||
ENV MIX_ENV prod
|
||||
ENV MIX_ENV=prod
|
||||
|
||||
RUN apk add git gcc g++ musl-dev make &&\
|
||||
echo "import Mix.Config" > config/prod.secret.exs &&\
|
||||
|
|
@ -15,18 +15,27 @@ RUN mix deps.get --only prod &&\
|
|||
|
||||
FROM alpine:latest
|
||||
|
||||
ARG HOME=/opt/pleroma
|
||||
ARG DATA=/var/lib/pleroma
|
||||
|
||||
RUN echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories &&\
|
||||
apk update &&\
|
||||
apk add ncurses postgresql-client
|
||||
|
||||
RUN adduser --system --shell /bin/false --home /opt/pleroma pleroma &&\
|
||||
mkdir -p /var/lib/pleroma/uploads &&\
|
||||
chown -R pleroma /var/lib/pleroma &&\
|
||||
mkdir -p /var/lib/pleroma/static &&\
|
||||
chown -R pleroma /var/lib/pleroma &&\
|
||||
RUN adduser --system --shell /bin/false --home ${HOME} pleroma &&\
|
||||
mkdir -p ${DATA}/uploads &&\
|
||||
mkdir -p ${DATA}/static &&\
|
||||
chown -R pleroma ${DATA} &&\
|
||||
mkdir -p /etc/pleroma &&\
|
||||
chown -R pleroma /etc/pleroma
|
||||
|
||||
USER pleroma
|
||||
|
||||
COPY --from=build --chown=pleroma:0 /release/ /opt/pleroma/
|
||||
COPY --from=build --chown=pleroma:0 /release ${HOME}
|
||||
|
||||
COPY ./config/docker.exs /etc/pleroma/config.exs
|
||||
COPY ./docker-entrypoint.sh ${HOME}
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
ENTRYPOINT ["/opt/pleroma/docker-entrypoint.sh"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue