How do I run two copies of the same app under two different names?
Tossmann opened this issue · comments
Setup
in the .puma-dev
path I created a symlink to platform A with the name test. Then I cloned the very same repo in another directory and created a subdirectory where I put the symlink.
Problem
The server I try to access first, will be started and accessed, while the other symlink uses the very same one. Is this a wished for behaviour?
At first I thought the problem lays in the subdirectory and similar naming of the application, but this wasn't the case.
Example symlinks
lrwxr-xr-x 1 my_name staff 30 6 Nov 14:49 test -> /Users/my_name/my_company/app_a
lrwxr-xr-x 1 my_name staff 30 6 Nov 14:49 foo -> /Users/my_name/app_a
Url's
https://test.test
https://foo.test
Is there a way to modify this behaviour or did I simply miss something?
I guess the reason for this would be to run two versions (edge and stable) at the same time?
The workaround to support running two copies of the same app would be to clone them to directories of different names. The canonical App
name is the name of the directory.
Doing something like
# clone to diff directory names, not subdirectories
git clone https://host/app_a.git ~/app_a_edge
git clone https://host/app_a.git ~/my_company/app_a
# symlinks
lrwxr-xr-x 1 my_name staff 30 6 Nov 14:49 stable -> /Users/my_name/my_company/app_a
lrwxr-xr-x 1 my_name staff 30 6 Nov 14:49 edge -> /Users/my_name/app_a_edge
would allow you to then access stable.test
and edge.test
.