Skip to content

Commit 1a357e3

Browse files
committed
simplify Dockerfile, logging added to setup project
1 parent 832bfe6 commit 1a357e3

File tree

3 files changed

+13
-29
lines changed

3 files changed

+13
-29
lines changed

integration/Dockerfile

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,14 @@ FROM elixir:1.6.1
22

33
RUN apt-get update && apt-get install -y inotify-tools
44

5-
ARG CONTAINER_USER='elixir'
6-
7-
ARG APP_DIR=/home/"${CONTAINER_USER}"/app
8-
9-
# RUN useradd -m -u 1000 -s /usr/bin/bash "${CONTAINER_USER}"
10-
11-
# USER "${CONTAINER_USER}"
12-
13-
WORKDIR "${APP_DIR}"
5+
WORKDIR "/opt/app"
146

157
RUN mix local.hex --force && mix local.rebar --force
16-
# TODO get + build deps
178

18-
COPY . ./
9+
# NOTE integration project has no config files to COPY
10+
COPY mix.exs mix.lock ./
11+
RUN mix do deps.get, deps.compile
1912

20-
# Cleartext port
21-
EXPOSE 8080
22-
# Secure port
23-
EXPOSE 8443
24-
# Wobserver port
25-
EXPOSE 4001
13+
COPY . ./
2614

27-
CMD ["sh", "bin/start"]
15+
CMD ["mix", "test"]

www/Dockerfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@ FROM elixir:1.6.1
22

33
RUN apt-get update && apt-get install -y inotify-tools
44

5-
ARG CONTAINER_USER='elixir'
6-
7-
ARG APP_DIR=/home/"${CONTAINER_USER}"/app
8-
9-
# RUN useradd -m -u 1000 -s /usr/bin/bash "${CONTAINER_USER}"
10-
11-
# USER "${CONTAINER_USER}"
12-
13-
WORKDIR "${APP_DIR}"
5+
WORKDIR "/opt/app"
146

157
RUN mix local.hex --force && mix local.rebar --force
168

9+
COPY config/* config/
10+
COPY mix.exs mix.lock ./
11+
RUN mix do deps.get, deps.compile
12+
1713
COPY . ./
1814

1915
CMD ["sh", "bin/start"]

www/lib/www.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule WWW do
2-
use Raxx.Server
3-
2+
43
@external_resource "lib/www.apib"
54
use Raxx.ApiBlueprint, "./www.apib"
65
use Raxx.Static, "./public"
6+
use Raxx.Logger
77
end

0 commit comments

Comments
 (0)