Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandruBurlacu committed Sep 15, 2017
1 parent c007f0e commit 2474fe6
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions config/config.exs
Expand Up @@ -4,8 +4,8 @@ use Mix.Config

config :elixir_docker, ElixirDocker.Repo,
adapter: Ecto.Adapters.Postgres,
# url: System.get_env("DATABASE_URL") || "postgres://postgres:postgres@localhost/elixir_docker_dev",
url: System.get_env("DATABASE_URL") || "postgres://postgres:@db/elixir_docker_dev",
url: System.get_env("DATABASE_URL") || "postgres://postgres:postgres@localhost/elixir_docker_dev",
# url: System.get_env("DATABASE_URL") || "postgres://postgres:@db/elixir_docker_dev",
pool_size: 5

config :elixir_docker, ecto_repos: [ElixirDocker.Repo]
Expand Down
4 changes: 0 additions & 4 deletions docker-compose.yml
Expand Up @@ -2,7 +2,6 @@ version: "3"
services:
web:
image: alexburlacu/elixir_docker:latest
# build: Dockerfile
deploy:
replicas: 3
restart_policy:
Expand All @@ -17,9 +16,6 @@ services:
- .:/app
depends_on:
- db
# command: sh init_db.sh
# links:
# - db

db:
image: postgres
Expand Down
1 change: 0 additions & 1 deletion lib/elixir_docker.ex
Expand Up @@ -14,7 +14,6 @@ defmodule ElixirDocker do
]

Logger.info "Started application"
# Users.count("http://jsonplaceholder.typicode.com/users")

Supervisor.start_link(children, strategy: :one_for_one,
name: ElixirDocker.Supervisor)
Expand Down
2 changes: 0 additions & 2 deletions lib/router.ex
Expand Up @@ -34,13 +34,11 @@ defmodule ElixirDocker.Router do

conn
|> put_resp_content_type("application/json")
|> (fn (x) -> Logger.error "It's ok"; x end).()
|> send_resp(200, data)
end

match _ do
conn
|> (fn (x) -> Logger.error "It's ok"; x end).()
|> send_resp(404, Poison.encode!(%{endpoint: "not implemented!"}))
end
end

0 comments on commit 2474fe6

Please sign in to comment.