Skip to content

Commit

Permalink
chore: change TRAEFIK_HOST to TRAEFIK_DASHBOARD_FQDN
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanemachine committed Sep 30, 2023
1 parent c7a8944 commit b2026c9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions support/containers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ Because Traefik can require a lot of custom configuration, it has its own direct
To run this project's built-in Traefik container service:

- Ensure that you set the required environment variable(s) before running Docker Compose:
- `TRAEFIK_HOST`: The URL to use for the Traefik dashboard
- e.g. `TRAEFIK_HOST=localhost`
- `TRAEFIK_DASHBOARD_FQDN`: The URL to use for the Traefik dashboard
- e.g. `TRAEFIK_DASHBOARD_FQDN=localhost`
- A generic `.env` file can be created using the `support/scripts/dotenv-generate script`
- You will need to include the following Compose files when running a Traefik container via `docker-compose`:
- `compose.traefik.yaml`
Expand All @@ -96,7 +96,7 @@ To run this project's built-in Traefik container service:
- Podman: `podman-compose -H unix:$(podman info --format '{{.Host.RemoteSocket.Path}}') -f compose.phoenix.yaml -f networks/compose.phoenix-traefik.yaml -f compose.phoenix-config-traefik-remote.yaml -f compose.phoenix-postgres.yaml -f compose.postgres.yaml -f networks/compose.postgres-traefik.yaml -f compose.traefik.yaml -f compose.traefik-config-remote.yaml up`
- To avoid running these long commands, use the easy-use scripts in `support/containers/scripts`.
- To access the Traefik dashboard:
- Using a web browser, navigate to the location of your `$TRAEFIK_HOST`.
- Using a web browser, navigate to the location of your `$TRAEFIK_DASHBOARD_FQDN`.
- e.g. `http://localhost/`
- To access the Phoenix web service:
- Using a web browser, navigate to the location of your `$PHX_HOST`.
Expand Down
4 changes: 2 additions & 2 deletions support/containers/compose.traefik.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ services:
traefik:
image: "docker.io/traefik:v2.10"
environment:
TRAEFIK_HOST: "${TRAEFIK_HOST:?}"
TRAEFIK_DASHBOARD_FQDN: "${TRAEFIK_DASHBOARD_FQDN:?}"
volumes:
- "${DOCKER_HOST:-/var/run/docker.sock}:/var/run/docker.sock:ro"
networks:
- "traefik-global-proxy"
ports:
- "80:80"
labels:
- "traefik.http.routers.traefik.rule=Host(`${TRAEFIK_HOST}`)"
- "traefik.http.routers.traefik.rule=Host(`${TRAEFIK_DASHBOARD_FQDN}`)"

# enable the dashboard
- "traefik.enable=true"
Expand Down
4 changes: 2 additions & 2 deletions support/scripts/dotenv-generate--template
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ done
if [ "$is_vagrant" = "1" ]; then
# configure environment for use with vagrant
PHX_HOST=phoenix-todo-list.localhost
TRAEFIK_HOST=localhost
TRAEFIK_DASHBOARD_FQDN=localhost
fi

default_phx_host=phoenix-todo-list.localhost
Expand Down Expand Up @@ -58,4 +58,4 @@ EMAIL_FROM_DEFAULT=\"${EMAIL_FROM_DEFAULT:-no-reply@${PHX_HOST:-$default_phx_hos
SENTRY_DSN=\"${SENTRY_DSN}\"
# traefik
TRAEFIK_HOST=\"${TRAEFIK_HOST:-localhost}\""
TRAEFIK_DASHBOARD_FQDN=\"${TRAEFIK_DASHBOARD_FQDN:-localhost}\""
2 changes: 1 addition & 1 deletion support/scripts/systemd-container-service-file-generate
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Environment=AWS_SECRET=\"$AWS_SECRET\"
Environment=SENTRY_DSN=\"$SENTRY_DSN\"
# traefik
Environment=TRAEFIK_HOST=\"$TRAEFIK_HOST\"
Environment=TRAEFIK_DASHBOARD_FQDN=\"$TRAEFIK_DASHBOARD_FQDN\"
# LIFECYCLE #
Expand Down
2 changes: 1 addition & 1 deletion support/scripts/systemd-native-service-generate
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Environment=POSTGRES_USER=\"$POSTGRES_USER\"
Environment=POSTGRES_PASSWORD=\"$POSTGRES_PASSWORD\"
# # traefik
# Environment=TRAEFIK_HOST=\"$TRAEFIK_HOST\"
# Environment=TRAEFIK_DASHBOARD_FQDN=\"$TRAEFIK_DASHBOARD_FQDN\"
# # email
# Environment=AWS_REGION=\"$AWS_REGION\"
Expand Down

0 comments on commit b2026c9

Please sign in to comment.