This repository has been archived by the owner on Sep 17, 2021. It is now read-only.
forked from govCMS/scaffold
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.lagoon.yml
83 lines (79 loc) · 2.79 KB
/
.lagoon.yml
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
docker-compose-yaml: docker-compose.yml
environments:
master:
cronjobs:
- name: drush cron
schedule: "M * * * *"
command: 'drush cron --root=/app'
service: cli
# Note regarding tasks in the scaffold.
# Please avoid making scripts more than one or two lines, and avoid if/else logic.
# When PaaS users or the support team modify this file, it should be easy to turn things on and off.
tasks:
# Pre-rollout tasks do not get called on first deploy; use post-rollout tasks instead.
# Pre-rollout tasks need to have file existance checks as these are run in the active
# containers and it is not guaranteed that the commands will be available there.
pre-rollout:
- run:
name: Pre-rollout database updates
command: "[ -f /app/vendor/bin/govcms-pre-deploy-db-update ] && /app/vendor/bin/govcms-pre-deploy-db-update || echo 'Pre Update databse is not available.'"
service: cli
shell: bash
- run:
name: Snapshot the database and store
command: "[ -f /app/vendor/bin/govcms-db-backup ] && /app/vendor/bin/govcms-db-backup || echo 'Database backup is not available.'"
service: cli
shell: bash
- run:
name: Snapshot the config and store
command: "[ -f /app/vendor/bin/govcms-config-backup ] && /app/vendor/bin/govcms-config-backup || echo 'Config backup is not available.'"
service: cli
shell: bash
post-rollout:
- run:
name: Prepare the site for deployment
command: /app/vendor/bin/govcms-update_site_alias
service: cli
shell: bash
## START SaaS-only
- run:
name: Prevent elevated permissions
command: /app/vendor/bin/govcms-validate-permissions
service: cli
shell: bash
- run:
name: Validate theme YAML files
command: /app/vendor/bin/govcms-validate-theme-yml || true
service: cli
shell: bash
## END SaaS-only
- run:
name: Synchronise the database
command: /app/vendor/bin/govcms-db-sync
service: cli
shell: bash
- run:
name: Perform database updates
command: /app/vendor/bin/govcms-db-update
service: cli
shell: bash
- run:
name: Perform config import
command: /app/vendor/bin/govcms-config-import
service: cli
shell: bash
- run:
name: Perform cache rebuild
command: /app/vendor/bin/govcms-cache-rebuild
service: cli
shell: bash
- run:
name: Ensure GovCMS/Lagoon modules are enabled
command: /app/vendor/bin/govcms-enable_modules
service: cli
shell: bash
- run:
name: Preserve the last successful backup
command: /app/vendor/bin/govcms-backups-preserve
service: cli
shell: bash