You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/examples/environments.md
+54-54Lines changed: 54 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,26 +15,26 @@ A platform has two services. Each service needs different variables per environm
15
15
Profile-level environments define shared variables and tasks that apply across all repos. Repo-specific variables and tasks are defined in each repo's own `raid.yaml`.
16
16
17
17
```yaml title="platform.raid.yaml"
18
-
name: platform
18
+
name: "platform"
19
19
20
20
repositories:
21
21
- name: api
22
-
url: git@github.com:my-org/api.git
23
-
path: ~/dev/api
22
+
url: "git@github.com:my-org/api.git"
23
+
path: "~/dev/api"
24
24
- name: frontend
25
-
url: git@github.com:my-org/frontend.git
26
-
path: ~/dev/frontend
25
+
url: "git@github.com:my-org/frontend.git"
26
+
path: "~/dev/frontend"
27
27
28
28
environments:
29
-
- name: local
29
+
- name: "local"
30
30
tasks:
31
31
- type: Print
32
32
message: "Switched to local"
33
-
- name: staging
33
+
- name: "staging"
34
34
tasks:
35
35
- type: Print
36
36
message: "Switched to staging"
37
-
- name: production
37
+
- name: "production"
38
38
tasks:
39
39
- type: Confirm
40
40
message: "Switch ALL services to production?"
@@ -46,66 +46,66 @@ Each repo defines its own environment variables and additional tasks in its `rai
46
46
47
47
```yaml title="~/dev/api/raid.yaml"
48
48
environments:
49
-
- name: local
49
+
- name: "local"
50
50
variables:
51
-
- name: DATABASE_URL
52
-
value: postgres://localhost:5432/api_dev
53
-
- name: API_HOST
54
-
value: localhost
55
-
- name: API_PORT
51
+
- name: "DATABASE_URL"
52
+
value: "postgres://localhost:5432/api_dev"
53
+
- name: "API_HOST"
54
+
value: "localhost"
55
+
- name: "API_PORT"
56
56
value: "3000"
57
-
- name: LOG_LEVEL
58
-
value: debug
57
+
- name: "LOG_LEVEL"
58
+
value: "debug"
59
59
tasks:
60
60
- type: Shell
61
61
cmd: docker-compose up -d db
62
-
- name: staging
62
+
- name: "staging"
63
63
variables:
64
-
- name: DATABASE_URL
65
-
value: postgres://staging-db.internal:5432/api
66
-
- name: API_HOST
67
-
value: api.staging.my-org.com
68
-
- name: API_PORT
64
+
- name: "DATABASE_URL"
65
+
value: "postgres://staging-db.internal:5432/api"
66
+
- name: "API_HOST"
67
+
value: "api.staging.my-org.com"
68
+
- name: "API_PORT"
69
69
value: "443"
70
-
- name: LOG_LEVEL
71
-
value: info
72
-
- name: production
70
+
- name: "LOG_LEVEL"
71
+
value: "info"
72
+
- name: "production"
73
73
variables:
74
-
- name: DATABASE_URL
75
-
value: postgres://prod-db.internal:5432/api
76
-
- name: API_HOST
77
-
value: api.my-org.com
78
-
- name: API_PORT
74
+
- name: "DATABASE_URL"
75
+
value: "postgres://prod-db.internal:5432/api"
76
+
- name: "API_HOST"
77
+
value: "api.my-org.com"
78
+
- name: "API_PORT"
79
79
value: "443"
80
-
- name: LOG_LEVEL
81
-
value: warn
80
+
- name: "LOG_LEVEL"
81
+
value: "warn"
82
82
tasks:
83
83
- type: Confirm
84
84
message: "Point API at production database?"
85
85
- type: Shell
86
-
cmd: ./scripts/rotate-api-key.sh
86
+
cmd: "./scripts/rotate-api-key.sh"
87
87
```
88
88
89
89
```yaml title="~/dev/frontend/raid.yaml"
90
90
environments:
91
-
- name: local
91
+
- name: "local"
92
92
variables:
93
-
- name: VITE_API_URL
94
-
value: http://localhost:3000
95
-
- name: VITE_ENV
96
-
value: local
97
-
- name: staging
93
+
- name: "VITE_API_URL"
94
+
value: "http://localhost:3000"
95
+
- name: "VITE_ENV"
96
+
value: "local"
97
+
- name: "staging"
98
98
variables:
99
-
- name: VITE_API_URL
100
-
value: https://api.staging.my-org.com
101
-
- name: VITE_ENV
102
-
value: staging
103
-
- name: production
99
+
- name: "VITE_API_URL"
100
+
value: "https://api.staging.my-org.com"
101
+
- name: "VITE_ENV"
102
+
value: "staging"
103
+
- name: "production"
104
104
variables:
105
-
- name: VITE_API_URL
106
-
value: https://api.my-org.com
107
-
- name: VITE_ENV
108
-
value: production
105
+
- name: "VITE_API_URL"
106
+
value: "https://api.my-org.com"
107
+
- name: "VITE_ENV"
108
+
value: "production"
109
109
tasks:
110
110
- type: Confirm
111
111
message: "Point frontend at production APIs?"
@@ -132,21 +132,21 @@ If local values differ between developers (ports, paths, credentials), use `Prom
0 commit comments