-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Docker #20
base: master
Are you sure you want to change the base?
Implement Docker #20
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM elixir:1.9 | ||
|
||
RUN mix local.hex --force && mix local.rebar --force | ||
|
||
WORKDIR /app | ||
|
||
COPY mix.exs mix.lock ./ | ||
RUN mix do deps.get, deps.compile | ||
|
||
COPY . ./ | ||
RUN mix compile | ||
|
||
CMD ./start.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ config :eventstore, EventStore.Storage, | |
username: "postgres", | ||
password: "postgres", | ||
database: "conduit_eventstore_dev", | ||
hostname: "localhost", | ||
hostname: "eventstore", | ||
pool_size: 10 | ||
|
||
# Configure the read store database | ||
|
@@ -51,5 +51,5 @@ config :conduit, Conduit.Repo, | |
username: "postgres", | ||
password: "postgres", | ||
database: "conduit_readstore_dev", | ||
hostname: "localhost", | ||
hostname: "readstore", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same than ☝️ |
||
pool_size: 10 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: '3' | ||
|
||
services: | ||
app: | ||
build: . | ||
depends_on: | ||
- eventstore | ||
- readstore | ||
ports: | ||
- 4000:4000 | ||
|
||
eventstore: | ||
image: postgres | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you should prefix and use a fix major version. |
||
|
||
readstore: | ||
image: postgres | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same ☝️ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
mix do event_store.create, event_store.init | ||
mix do ecto.create, ecto.migrate | ||
mix phx.server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By doing this, you will force everybody to run on docker. Because if you run it locally it won't work..
I'm pretty sure this is not what people want :) What do you think?