Add ENDPOINT_HOST and ENDPOINT_PORT

This commit is contained in:
Alex
2022-07-29 12:14:43 +02:00
parent 77c6a9cd65
commit 80e2d2dc4a
3 changed files with 7 additions and 3 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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`
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