-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Config (Traefik): Configure a Traefik reverse proxy Docker container …
…to use muscle.local and backend.muscle.local domains (#717) * config(traefik): Configure traefik and the corresponding host names (muscle.local & backend.muscle.local) * config: Add (idempotent) script to add host entries (muscle.local & backend.muscle.local) to the hosts file * chore: Remove unused network configuration in docker-compose.yaml * chore: Rename add hosts entries file * docs(traefik): Document the Traefik configuration for the frontend and backend the docker compose configuration file * docker(traefik): Update traefik image version to always use latest
- Loading branch information
1 parent
7981e54
commit a9111d9
Showing
3 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# Define host entries | ||
HOST_ENTRIES=( | ||
"# MUSCLE" | ||
"127.0.0.1 muscle.local" | ||
"127.0.0.1 backend.muscle.local" | ||
"# END MUSCLE" | ||
) | ||
|
||
# Path to the hosts file | ||
HOSTS_FILE="/etc/hosts" | ||
|
||
# Function to add an entry if it doesn't exist | ||
add_host_entry() { | ||
local entry=$1 | ||
if ! grep -q "$entry" "$HOSTS_FILE"; then | ||
echo "$entry" | sudo tee -a "$HOSTS_FILE" | ||
else | ||
echo "Entry already exists: $entry" | ||
fi | ||
} | ||
|
||
# Add each host entry | ||
for entry in "${HOST_ENTRIES[@]}"; do | ||
add_host_entry "$entry" | ||
done |