This repository was archived by the owner on Jan 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhatmax.yml
More file actions
142 lines (140 loc) · 3.37 KB
/
hatmax.yml
File metadata and controls
142 lines (140 loc) · 3.37 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
140
141
142
version: 0.1
name: "ref"
package: "github.com/adrianpk/hatmax-ref"
deployment:
platforms: [nomad]
nomad:
datacenter: dc1
consul_integration: true
traefik_integration: true
default_resources:
cpu: 256
memory: 128
infrastructure:
consul:
enabled: true
address: "127.0.0.1:8500"
traefik:
enabled: true
entrypoint: web
domain: "localhost"
services:
authn:
kind: domain
preset: auth # Predefined auth implementation - models and aggregates included by default
repo_impl: [sqlite, mongo]
deployment:
nomad:
port: 8082
replicas: 1
resources:
cpu: 256
memory: 128
health_check:
path: "/health"
interval: "30s"
traefik:
rule: "PathPrefix(`/authn`)"
priority: 200
consul:
service_name: "authn"
tags: ["authn", "v1"]
authz:
kind: domain
preset: authz # Predefined authorization implementation - roles, grants, policies included by default
repo_impl: [sqlite, mongo]
deployment:
nomad:
port: 8083
replicas: 1
resources:
cpu: 256
memory: 128
health_check:
path: "/health"
interval: "30s"
traefik:
rule: "PathPrefix(`/authz`)"
priority: 201
consul:
service_name: "authz"
tags: ["authz", "v1"]
todo:
kind: atom
repo_impl: [sqlite, mongo]
auth:
enabled: true
mode: development
required_scopes: ["read:todos", "write:todos"]
deployment:
nomad:
port: 8080
replicas: 1
resources:
cpu: 256
memory: 128
health_check:
path: "/health"
interval: "30s"
traefik:
rule: "PathPrefix(`/todo`)"
priority: 100
consul:
service_name: "todo"
tags: ["api", "v1"]
models:
Item:
options:
audit: true
lifecycle: [before_create, before_update]
fields:
text: {type: text, validations: [{name: required}]}
done: {type: bool, default: false}
Tag:
options:
audit: true
lifecycle: [before_create, before_update]
fields:
name: {type: string, validations: [{name: required}]}
color: {type: string, default: "blue"}
aggregates:
List:
audit: true
fields:
name: {type: string, validations: [{name: required}]}
description: {type: text}
children:
items:
of: Item
audit: true
tags:
of: Tag
audit: true
api:
base_path: /todo
handlers:
- id: todo_items_list
route: "GET /items"
source: repo
model: Item
op: list
- id: todo_items_create
route: "POST /items"
source: repo
model: Item
op: create
- id: todo_items_get
route: "GET /items/{id}"
source: repo
model: Item
op: get
- id: todo_items_update
route: "PATCH /items/{id}"
source: repo
model: Item
op: update
- id: todo_items_delete
route: "DELETE /items/{id}"
source: repo
model: Item
op: delete