-
Notifications
You must be signed in to change notification settings - Fork 4
Server Configuration
In order for stag to talk to your server, you'll need to have ssh access. If you aren't able to ssh in to your server, you won't be able to run any remote commands. There are no defaults for servers as every one is different, but let's dig through an example config:
servers:
production: # Server Name
host: example.com
webroot: /var/www/example.com/public
user: deploy
port: 22
forward_agent: true
strategy: git
repo_url: git@github.com:example.git
ftp_password: password
production: This is the name of your server. We name it after the environment of the server, (production, dev) but you can name it whatever you want. This is the name you will reference when you pass a server name to stag. So in the example above, you would run the deploy command like so: stag deploy production
host: This is the host name of your server.
webroot: This is the absolute path on the server where you Statamic site lives.
user: This is the user name you ssh into the server with.
port: If you're running ssh on the non-standard port, specify it here.
forward_agent: This is recommended if you're using git as your deployment strategy. This uses your local ssh key to authenticate with your git pulls & pushes.
strategy: You can set this to use git, rsync, or ftp.
repo_url: If you are using git as your strategy, set the ssh repo url.
ftp_password: The password used to ftp into your server. This is only need for the ftp strategy.