mirror of
https://github.com/writefreely/writefreely
synced 2024-11-10 11:24:13 +00:00
add production stage
This commit is contained in:
parent
08403ca845
commit
66d9ecf387
1 changed files with 11 additions and 2 deletions
13
Dockerfile
13
Dockerfile
|
@ -16,12 +16,21 @@ RUN mkdir -p \
|
|||
cp -r templates/ pages/ static/ /home/writefreely && \
|
||||
cp config.ini.example /home/writefreely/config.ini
|
||||
|
||||
FROM alpine AS final
|
||||
FROM alpine AS dev
|
||||
|
||||
# TODO user nobody or similar
|
||||
COPY --from=build /src/cmd/writefreely/writefreely /bin
|
||||
COPY --from=build /home /home
|
||||
|
||||
EXPOSE 8080
|
||||
WORKDIR /home/writefreely
|
||||
ENTRYPOINT [ "writefreely" ]
|
||||
|
||||
FROM alpine AS prod
|
||||
|
||||
|
||||
RUN apk add ca-certificates openssl
|
||||
COPY --from=dev . .
|
||||
|
||||
EXPOSE 80 443
|
||||
WORKDIR /home/writefreely
|
||||
ENTRYPOINT [ "writefreely" ]
|
Loading…
Reference in a new issue