Skip to content

Commit

Permalink
use container name as router name
Browse files Browse the repository at this point in the history
  • Loading branch information
devosc committed Apr 18, 2020
1 parent 9f74617 commit 3d58458
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/docker-create-project
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,12 @@ function create_docker_compose_file()
sed -i.bak "s#container_name: .*#container_name: ${name}#g" "${compose_file}"
rm "${compose_file}.bak"

echo "Route: ${name}"
sed -i.bak -E "s#routers\.(.+)\.(.*)#routers\.${name}\.\2#" "${compose_file}"
rm "${compose_file}.bak"

echo "Host: ${host}"
sed -i.bak "s#Host(.*#Host(\\\`${host}\\\`)#g" "${compose_file}"
sed -i.bak "s#rule=Host(.*#rule=Host(\\\`${host}\\\`)#g" "${compose_file}"
rm "${compose_file}.bak"

echo "Document root: ${document_root}"
Expand Down

0 comments on commit 3d58458

Please sign in to comment.