Skip to content

Commit 55304a5

Browse files
committed
Update example.yml
1 parent b97b996 commit 55304a5

File tree

1 file changed

+175
-16
lines changed

1 file changed

+175
-16
lines changed

examples/gosync.yml

Lines changed: 175 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,191 @@
11
---
22

3+
#########################
4+
## Sync
5+
#########################
36
sync:
47
production: &production
5-
localPath: ./test/
6-
foobar: ./test/
8+
9+
## Base path for sync
10+
path: "./test/"
711

812
connection:
913
type: ssh
10-
hostname: remote
11-
user: user
12-
password: password
14+
hostname: example.com
15+
user: ssh-user
1316

17+
#########################
18+
## Filesystem rsync
19+
#########################
1420
filesystem:
15-
- path:
21+
## Sync /tmp/remote/path to ./test/ (defined before)
22+
- path: /tmp/remote/path
23+
filter:
1624
exclude:
25+
- .git
26+
- node_modules/
1727

18-
databases:
19-
- type: mysql
20-
database: typo3
21-
username: root
28+
## Sync /tmp/remote/other/path to ./other/
29+
- path: /tmp/remote/other/path
30+
local: ./other/
31+
filter:
32+
exclude:
33+
- .git
34+
- node_modules/
35+
36+
#########################
37+
## Database
38+
#########################
39+
database:
40+
41+
## NORMAL MYSQL
42+
## Sync schema typo3 to local test-local (without cache tables)
43+
##
44+
## remote: connect via ssh and get dump from local installed mysql
45+
## local: connect via mysql to a database server "mysql.example.com"
46+
- type: mysql
47+
schema: application1
48+
user: mysql-user
49+
password: mysql-password
50+
filter:
51+
exclude:
52+
- "^cache_.*"
53+
include:
54+
local:
55+
## use plain mysql connection
56+
schema: test-application1
57+
user: root
58+
password: dev
59+
port: 13306
60+
hostname: mysql.example.com
61+
options:
62+
## clear database before restore
63+
## (delete all tables inside)
64+
clear-database: true
65+
66+
## DOCKER
67+
## Sync schema typo3 to local test-local into a docker container
68+
##
69+
## remote: connect via ssh and get dump from local installed mysql
70+
## local: use docker container "2713f9093bed" for restore
71+
- type: mysql
72+
schema: application2
73+
user: mysql-user
74+
password: mysql-password
75+
filter:
76+
exclude:
77+
include:
78+
local:
79+
schema: test-application2
80+
user: root
81+
password: dev
82+
connection:
83+
docker: 2713f9093bed
84+
options:
85+
## clear database before restore
86+
## (delete all tables inside)
87+
clear-database: true
88+
89+
## DOCKER-COMPOSE
90+
## Sync schema typo3 to local test-local into a docker-compose container
91+
##
92+
## docker-compose.yml has to be in the same or parent directory!
93+
##
94+
## remote: connect via ssh and get dump from local installed mysql
95+
## local: use docker-compose container "mysql" for restore
96+
- type: mysql
97+
schema: application3
98+
user: mysql-user
99+
password: mysql-password
100+
filter:
101+
exclude:
102+
include:
103+
local:
104+
schema: test-application3
105+
user: root
22106
password: dev
107+
connection:
108+
docker: compose:mysql
109+
options:
110+
## clear database before restore
111+
## (delete all tables inside)
112+
clear-database: true
113+
114+
#########################
115+
## Execute
116+
#########################
117+
exec-startup:
118+
## Execute date on local system
119+
- type: local
120+
command: date +%s
121+
122+
## Execute date on local system (alternative style)
123+
- type: local
124+
command:
125+
- date
126+
- +%s
127+
128+
## Execute date with workdir
129+
- type: local
130+
command:
131+
- date
132+
workdir: /
133+
134+
## Execute remote date with workdir
135+
- type: remote
136+
command: date
137+
workdir: /
138+
139+
exec-finish:
140+
## Execute remote date with workdir
141+
- type: remote
142+
command: date
143+
workdir: /
144+
145+
#########################
146+
## Deploy
147+
#########################
148+
deploy:
149+
production: &foobar
150+
path: "./test/"
151+
152+
connection:
153+
type: ssh
154+
hostname: example.com
155+
user: ssh-user
156+
157+
filesystem:
158+
- path: /tmp/path
159+
filter:
160+
exclude:
161+
- .git
162+
- node_modules/
163+
164+
- path: /tmp/other/path
165+
local: ./other/
166+
filter:
167+
exclude:
168+
- .git
169+
- node_modules/
170+
171+
database:
172+
- type: mysql
173+
schema: foobar
174+
user: mysql-user
175+
password: mysql-password
23176
filter:
24177
exclude:
25-
<<: *databaseExcludeTYPO3
26178
include:
179+
local:
180+
schema: test
181+
user: root
182+
password: dev
183+
connection:
184+
docker: compose:mysql
185+
user: root
186+
password: dev
187+
options:
188+
clear-database: true
27189

28-
deploy:
29-
production:
30-
<<: *production
31-
connection:
32-
type: docker
190+
production2:
191+
<<: *foobar

0 commit comments

Comments
 (0)