-
Notifications
You must be signed in to change notification settings - Fork 1
/
sites-sync.example.yaml
92 lines (81 loc) · 3.82 KB
/
sites-sync.example.yaml
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
################################################################################
# This is a configuration file for sites-sync package. #
# #
# You can use environment variables using ${ENV_NAME} construction in file. #
# #
# Custom variables: #
# - ${TIME:<template>} - formatted time using date-fns library #
# Documentation: https://date-fns.org/docs/format #
################################################################################
# ID of current site. You can use environment variable to set right id per site.
siteId: ${SITE}
# ID of default upstream site, that will be used to sync data from.
# You can override upstream site using `-s siteId` command line argument.
siteUpstreamId: ${SITE_UPSTREAM}
# Location of directory for temporary files
tempDirectory: /tmp
# Configuration for backup and restore commands
backup:
# Path to directory where to create backups
directory: sites-sync-backups/
# Format of directory name for each backup archives bundle
nameFormat: backup_{%TIME:yyyy-mm-dd_HH-MM-ss%}
# Number of directories to keep. Deletion performs on directories with older
# modification time. Set to zero or remove to disable auto cleanup feature.
keepAmount: 10
# Database access configuration
databases:
main:
# URI in format: database_type://user:password@host/db_name
# Currently supported database types: postgresql, mongo
# Examaple: postgresql://site_user:superPassw0rd@localhost/my_database
uri: ${DATABASE_URL}
# custom paramaters to add when launching database binary
customParams:
# for query tool (`psql` for postgresql, `mysql` for mysql)
query:
# for dump tool (`pg_dump` for postgresql, `mysqldump` for mysql)
# it's recommended to set '-no-owner' for postgresql, if your site use
# different usernames per site
dump: --no-owner
# Here you can define custom hooks to execute before and after command
# commandsHooks:
# pull:
# before: scripts/clear-cache
# after: scripts/rebuild-cache
# List of storage locations to sync in format: "name: path"
# Path can be relative or absolute.
directories:
files: "public/files"
images: "public/images"
# List of remote sites with access credentials and configuration.
sites:
dev:
# command to open shell on remote site
execCommand: ssh [email protected]
terminalCommand: ssh -t [email protected]
# root location of remote site, used to change directory after connection.
rootDirectory: "/home/user/mycoolsite.org/"
# custom shell to use when connecting.
shell: "bash"
# for ssh commands we need to quote all commmands bundle, for kubectl - not
quoteCommands: true
stage:
execCommand: kubectl exec -n mycoolsite-staging -i deployment/mycoolsite
terminalCommand: kubectl exec -n mycoolsite-staging -i -t deployment/mycoolsite
# Here you can override custom hooks per site
# commandsHooks:
# pull:
# before: scripts/clear-cache; scritps/kube-upstream-config.sh
# after: scripts/rebuild-cache
live:
execCommand: kubectl exec -n mycoolsite-prod -i deployment/mycoolsite
terminalCommand: kubectl exec -n mycoolsite-prod -i -t deployment/mycoolsite
# This is a flag, that disables destructive operations on that site (pushing changes, restore from backup, etc).
disableDestructiveOperations: true
# You can override executable of database's dump and query commands for current site using this section:
# databasesOverride:
# main:
# customExecutable:
# dump: ./scripts/custom-dump.sh
# query: /usr/local/bin/mysql8.0