Skip to content

Commit

Permalink
updating water cooler
Browse files Browse the repository at this point in the history
  • Loading branch information
CrowdHailer committed Oct 24, 2017
1 parent 2ec7c58 commit 54853f9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 24 deletions.
20 changes: 7 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
FROM elixir:1.5.1

# Important! Update this no-op ENV variable when this Dockerfile
# is updated with the current date. It will force refresh of all
# of the base images and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built.
ENV REFRESHED_AT=2017-08-22

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

RUN mix local.hex --force && mix local.rebar --force
ARG CONTAINER_USER='elixir'

COPY mix.* /app/
COPY config /app/config
RUN cd /app && mix deps.get && mix deps.compile
ARG APP_DIR=/home/"${CONTAINER_USER}"/app

COPY . /app
RUN useradd -m -u 1000 -s /usr/bin/bash "${CONTAINER_USER}"

WORKDIR /app
USER "${CONTAINER_USER}"

CMD iex -S mix
WORKDIR "${APP_DIR}"

RUN mix local.hex --force && mix local.rebar --force
5 changes: 0 additions & 5 deletions config/config.exs

This file was deleted.

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ services:
- SERVICE_NAME=web
- ERLANG_COOKIE=asd&%rewss
volumes:
- .:/app
- .:/home/elixir/app
command: sh start.sh
4 changes: 2 additions & 2 deletions lib/water_cooler/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ defmodule WaterCooler.Application do
end

defp secure_port do
Application.get_env(:water_cooler, :secure_port)
|> get_value()
{p, ""} = System.get_env("SECURE_PORT") |> Integer.parse
p
end

defp get_value({:system, type, env_name, default}) do
Expand Down
6 changes: 3 additions & 3 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%{"ace": {:hex, :ace, "0.14.0", "5b95c65b5edcc701fedec798da732d931f976301cf767502aeef3c074abfb9d2", [:mix], [{:hpack, "~> 0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}, {:raxx, "~> 0.12.0", [hex: :raxx, repo: "hexpm", optional: false]}], "hexpm"},
%{"ace": {:hex, :ace, "0.14.6", "66454d31fb3b1d44a5f1b49949993f86dead7da0749d3e4621f2898138faaef5", [], [{:hpack, "~> 0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}, {:raxx, "~> 0.12.0", [hex: :raxx, repo: "hexpm", optional: false]}], "hexpm"},
"certifi": {:hex, :certifi, "2.0.0", "a0c0e475107135f76b8c1d5bc7efb33cd3815cb3cf3dea7aefdd174dabead064", [], [], "hexpm"},
"cookie": {:hex, :cookie, "0.1.0", "4321c09d47db89c095cdee82afa44a6ccabf2755f2257d07a617d89f9d52715e", [], [], "hexpm"},
"cowboy": {:hex, :cowboy, "1.1.2", "61ac29ea970389a88eca5a65601460162d370a70018afe6f949a29dca91f3bb0", [], [{:cowlib, "~> 1.0.2", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3.2", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm"},
Expand All @@ -16,10 +16,10 @@
"plug": {:hex, :plug, "1.4.3", "236d77ce7bf3e3a2668dc0d32a9b6f1f9b1f05361019946aae49874904be4aed", [], [{:cowboy, "~> 1.0.1 or ~> 1.1", [hex: :cowboy, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm"},
"poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [], [], "hexpm"},
"ranch": {:hex, :ranch, "1.3.2", "e4965a144dc9fbe70e5c077c65e73c57165416a901bd02ea899cfd95aa890986", [], [], "hexpm"},
"raxx": {:hex, :raxx, "0.12.0", "7d9b94ca7ea77bd498de973780b1def799fb78906fe3007dc4acf47661940258", [:mix], [{:http_status, "~> 0.2", [hex: :http_status, repo: "hexpm", optional: false]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug, "~> 1.2", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
"raxx": {:hex, :raxx, "0.12.1", "8f0c44d76ddf65fa6a96d3c91ff2e1216e7ace9922464454956877016fd61022", [], [{:http_status, "~> 0.2", [hex: :http_status, repo: "hexpm", optional: false]}, {:plug, "~> 1.2", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
"server_sent_event": {:hex, :server_sent_event, "0.2.1", "4aa61ad29355351872cf9742269b75ecfb908bf64bad830dc4010d815037f9c7", [], [], "hexpm"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.1", "28a4d65b7f59893bc2c7de786dec1e1555bd742d336043fe644ae956c3497fbe", [], [], "hexpm"},
"tokumei": {:hex, :tokumei, "0.8.3", "e7704ad71cc2fe58eed6abc9820c35e8d56e012a2fb54d5d869a8aa3d9a36cbc", [:mix], [{:cookie, "~> 0.1.0", [hex: :cookie, repo: "hexpm", optional: false]}, {:raxx, "~> 0.12.0", [hex: :raxx, repo: "hexpm", optional: false]}], "hexpm"},
"tokumei": {:hex, :tokumei, "0.8.3", "e7704ad71cc2fe58eed6abc9820c35e8d56e012a2fb54d5d869a8aa3d9a36cbc", [], [{:cookie, "~> 0.1.0", [hex: :cookie, repo: "hexpm", optional: false]}, {:raxx, "~> 0.12.0", [hex: :raxx, repo: "hexpm", optional: false]}], "hexpm"},
"unicode_util_compat": {:hex, :unicode_util_compat, "0.3.1", "a1f612a7b512638634a603c8f401892afbf99b8ce93a45041f8aaca99cadb85e", [], [], "hexpm"},
"websocket_client": {:hex, :websocket_client, "1.3.0", "2275d7daaa1cdacebf2068891c9844b15f4fdc3de3ec2602420c2fb486db59b6", [], [], "hexpm"},
"wobserver": {:hex, :wobserver, "0.1.8", "3ed5ea55478627f0593800ab83919b71f41fd426ec344e71cf1d975e6d2065b8", [], [{:cowboy, "~> 1.1", [hex: :cowboy, repo: "hexpm", optional: false]}, {:httpoison, "~> 0.11 or ~> 0.12", [hex: :httpoison, repo: "hexpm", optional: false]}, {:plug, "~> 1.3 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}, {:poison, "~> 2.0 or ~> 3.1", [hex: :poison, repo: "hexpm", optional: false]}, {:websocket_client, "~> 1.2", [hex: :websocket_client, repo: "hexpm", optional: false]}], "hexpm"}}

0 comments on commit 54853f9

Please sign in to comment.