mirror of
https://github.com/mitchell/shortnr.git
synced 2025-12-18 22:07:21 +00:00
Add terraform configuration; Modify dockerfile workdirs;
Modify router to simplify routes
This commit is contained in:
parent
fa5f55740c
commit
7ea55a00f3
5 changed files with 100 additions and 9 deletions
12
Dockerfile
12
Dockerfile
|
|
@ -1,17 +1,19 @@
|
|||
FROM elixir:1.10 as build
|
||||
|
||||
WORKDIR /root/shortnr
|
||||
WORKDIR /shortnr
|
||||
COPY . .
|
||||
|
||||
RUN mix local.hex --force
|
||||
RUN mix local.rebar --force
|
||||
|
||||
RUN env MIX_ENV=prod mix release
|
||||
ENV MIX_ENV prod
|
||||
RUN mix clean --deps
|
||||
RUN mix release
|
||||
|
||||
FROM debian:stable-20191224-slim
|
||||
|
||||
WORKDIR /home/shortnr
|
||||
COPY --from=build /root/shortnr/_build/prod/rel/shortnr/ .
|
||||
WORKDIR /shortnr
|
||||
COPY --from=build /shortnr/_build/prod/rel/shortnr/ .
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libtinfo5=6.1+20181013-2+deb10u2 \
|
||||
|
|
@ -26,7 +28,7 @@ ENV LANGUAGE en_US:en
|
|||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
RUN groupadd -r shortnr && useradd --no-log-init -r -g shortnr shortnr
|
||||
RUN chown -R shortnr:shortnr /home/shortnr
|
||||
RUN chown -R shortnr:shortnr /shortnr
|
||||
USER shortnr
|
||||
|
||||
ENTRYPOINT ["bin/shortnr", "start"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue