-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJuicefile
More file actions
139 lines (128 loc) · 4.49 KB
/
Copy pathJuicefile
File metadata and controls
139 lines (128 loc) · 4.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# -*- mode: yaml -*-
# vi: set ft=yaml:
# Development project information
project:
name: example
url: example.dev
# Deployment configuration
deployment:
# Git repository used for deployment
repository:
# The url of our Git repository
repo_url: https://github.com/themejuice/deploy-example.git
# The branch we want to deploy
branch: :master
# We want to use rsync for deployment (required)
scm: :rsync
# Deployment settings
settings:
# Number of releases we want to keep a history of. This allows us to rollback a deployment
# back to the last 5 releases.
keep_releases: 5
# Log format (see Capistrano documentation for additional options)
format: :pretty
# Log level (see Capistrano documentation for additional options)
log_level: :verbose
# We do not need to use sudo for our deployment
use_sudo: false
# SSH options (see Capistrano documentation for additional options)
ssh_options:
keys: ~/.ssh/id_rsa
forward_agent: true
paranoid: true
# Add additional directories to $PATH. This is useful if you're
# on a shared hosting environment (i.e. GoDaddy) and you need
# to use an executable such as wp-cli for database migration.
# default_env:
# path: /opt/wp-cli/bin:$PATH
# Rsync-related options
rsync:
# Where we want to 'stage' our deployment, e.g. run our build system if we have one
stage: tmp/deploy
# Where we want to keep a cache of our deployments (cache = faster deploys)
cache: shared/deploy
# We're going to use Git as our version control system
scm: :git
# We only want to close with a depth of 1 when performing a `git clone` of our repository
depth: 1
# Options to pass to the rsync command (see Rsync documentation for additional options)
options:
- --recursive
- --delete
- --delete-excluded
- --exclude="Juicefile"
- --exclude=".git*"
# Run application build scripts (if any)
# install:
# - npm install
# - grunt build
# Run scripts before the deployment starts
# pre_scripts:
# - touch .maintenance
# Run scripts before the deployment finishes
# post_scripts:
# - rm .maintenance
# - sudo service apache2 restart
# Slack integration (see: https://github.com/onthebeach/capistrano-slackify)
# slack:
# url: https://hooks.slack.com/services/your-token
# username: Deploybot
# channel: "#devops"
# emoji: ":rocket:"
# Deployment stages
stages:
# Our production stage
production:
server: 192.168.33.10 # Our production IP address
path: /var/www/example # Path to directory we want to deploy to
user: deploy # User we want to deploy as
url: example.com # Our production domain
uploads: wp-content/uploads # Path to our uploads folder
tmp: tmp # Path to our temp directory
shared: # Shared files and folders
- wp-config.php # Shared wp-config file
- some-directory/ # Shared directory (trailing slash = directory)
roles: # Roles for this stage (required)
- :web
- :app
- :db
# Our staging stage
# staging:
# server: 192.168.33.10
# path: /var/www/example-staging
# user: deploy
# url: staging.example.com
# uploads: wp-content/uploads
# tmp: tmp
# shared:
# - wp-config.php
# roles:
# - :web
# - :app
# - :db
# Another stage (stage names can be arbitrary)
# stage2:
# server: 192.168.33.10
# path: /var/www/example
# user: deploy
# url: stage2.example.com
# uploads: wp-content/uploads
# tmp: tmp
# shared:
# - wp-config.php
# roles:
# - :web
# - :app
# - :db
# Our Vagrant development environment
vagrant:
server: 192.168.13.37 # Our virtual machines IP address
path: /srv/www/tj-example # The path to our project within the VM
user: vagrant # SSH user
pass: vagrant # SSH password
url: example.dev # Our development domain
uploads: wp-content/uploads # Path to our uploads directory
backup: backup # Path to where we want to store DB backups
tmp: tmp # Path to our temp directory
roles: # Roles for this stage (required)
- :dev