diff --git a/config/runtime.exs b/config/runtime.exs index a5a93fa..7da64c4 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -38,8 +38,8 @@ if config_env() == :prod do config :claper, ClaperWeb.Endpoint, url: [ - host: System.get_env("ENDPOINT_HOST"), - port: 80 + host: System.get_env("ENDPOINT_HOST", "localhost"), + port: System.get_env("ENDPOINT_PORT", 80) ], http: [ # Enable IPv6 and bind on all interfaces. diff --git a/docker-compose.yml b/docker-compose.yml index 89b5e5d..f4d47e3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,5 +16,6 @@ services: DATABASE_URL: postgres://claper:claper@db:5432/claper SECRET_KEY_BASE: 0LZiQBLw4WvqPlz4cz8RsHJlxNiSqM9B48y4ChyJ5v1oA0L/TPIqRjQNdPZN3iEG MAIL_TRANSPORT: local + ENDPOINT_PORT: 4000 depends_on: - db \ No newline at end of file diff --git a/guides/introduction/configuration.md b/guides/introduction/configuration.md index 12acfa7..ab5780f 100644 --- a/guides/introduction/configuration.md +++ b/guides/introduction/configuration.md @@ -29,4 +29,7 @@ You can use all local variables plus the following: Variable | Values | Default | Required | Description --- | --- | --- | --- | --- DATABASE_URL | - | - | ✓ | Postgres connection string -SECRET_KEY_BASE | - | - | ✓ | Generate it with `mix phx.gen.secret` \ No newline at end of file +SECRET_KEY_BASE | - | - | ✓ | Generate it with `mix phx.gen.secret` +ENDPOINT_HOST | - | localhost | - | Host used to access the app (used for url generation) +ENDPOINT_PORT | - | 80 | - | Port used to access the app (used for url generation) +PORT | - | 4000 | - | Port to listen to \ No newline at end of file