Moving a site in place
The move
command unpacks the uploaded tar-archive, moves the folder to the webroot, removes the old symlink to the site (alias), and creates a new one for the new code.
dopcat move
Options
--app-name[=APP-NAME] App name
--tar[=TAR] Tar name
--server[=SERVER] Server
--user[=USER] User (ssh)
--ssh_port[=SSH_PORT] SSH port
--identity_file[=IDENTITY_FILE] Identify file
--web_root[=WEB_ROOT] Web root
--build-id[=BUILD-ID] Id [default: "_"]
--separator[=SEPARATOR] Name separator [default: "_"]
--ssh_key_password[=SSH_KEY_PASSWORD] SSH key password
--temp_folder[=TEMP_FOLDER] Temp folder [default: "/tmp"]
--alias[=ALIAS] Symlink alias
--keeptar Keep tar after move (defaults to no)
Yaml
app_name: foo
local:
environment:
tar_name: foo.tar
tar_dir: /tmp/here/it/is
remote:
environment:
server: some.ip.address
ssh_user: someuser
ssh_port: someport
target_dir: /where/to/upload
identity_file: /path/to/my/ssh/key
ssh_key_password: somepass
web_root: /var/www/webroot
temp_folder: /where/upload/placed/tar/archive
alias: mysite_latest_prod
site:
environment:
url: digitalist.se
name: dgseprod
profile: dgse
profile_options: NULL
The alias
is a symlink to the deployed folder on the remote server.