so I have a server with Linux to which I deploy staging Laravel application from Gitlab using the Gitlab Envoy guide
The structure of folders is as follows:
- /public_html/
main folder where user is redirected to - /releases/
folder with all releases- /timestampA/
specific release app - /timestampB/
specific release app
- /timestampA/
There is a problem when creating a symlink between
ln -nfs releases/timestamp public_html
the symlink that is created looks like this
./releases/timestamp -> public_html/timestamp
now it is supposed to be like this
./releases/timestamp -> public_html
does anyone know why this happens and possibly how to fix it?
This happens because
public_htmlalready exists and is a directory.From the
man ln(bold is mine):In order to achieve what you want you should remove the
public_htmlfolder first (or add-Foption tolncommand, but it's not guaranteed to work).