Skip to content
Permalink
Browse files

Code for step 2

  • Loading branch information
akoutmos committed Aug 21, 2019
1 parent 26423e0 commit 5abfa4a1c07b23be3624c43dccacff38f5c9a479
Showing with 42 additions and 1 deletion.
  1. +1 −1 config/dev.exs
  2. +41 −0 docker-compose.yml
@@ -5,7 +5,7 @@ config :elixir_monitoring_prom, ElixirMonitoringProm.Repo,
username: "postgres",
password: "postgres",
database: "elixir_monitoring_prom_dev",
hostname: "localhost",
hostname: "postgres",
show_sensitive_data_on_connection_error: true,
pool_size: 10

@@ -0,0 +1,41 @@
version: '3.7'

services:
elixir_app:
image: elixir:1.9.1
command: >
/bin/sh -c 'apt-get update && apt-get install -y inotify-tools &&
mix local.hex --force &&
mix local.rebar --force &&
mix deps.get &&
mix ecto.setup &&
mix phx.server'
ports:
- '4000:4000'
depends_on:
- postgres
working_dir: /app
volumes:
- ./config:/app/config:ro
- ./lib:/app/lib:ro
- ./priv:/app/priv:ro
- ./.formatter.exs:/app/formatter.exs:ro
- ./mix.exs:/app/mix.exs:ro
- ./mix.lock:/app/mix.lock:ro
- elixir-deps:/app/deps/
- elixir-build:/app/_build/

postgres:
image: mdillon/postgis:11-alpine
ports:
- '5432:5432'
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres

volumes:
elixir-deps: {}
elixir-build: {}
postgres-data: {}

0 comments on commit 5abfa4a

Please sign in to comment.
You can’t perform that action at this time.