Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 7369cd8

Browse files
committed
feat(schema): allow dns module type
1 parent 65f60c2 commit 7369cd8

File tree

3 files changed

+66
-3
lines changed

3 files changed

+66
-3
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
domains:
3+
- domain: mydomain.com
4+
dns:
5+
provider: getstackhead.stackhead_dns_cloudflare
6+
expose:
7+
- service: app
8+
internal_port: 8080
9+
external_port: 80
10+
- service: app
11+
internal_port: 5000
12+
external_port: 4545
13+
security:
14+
authentication:
15+
- type: basic
16+
username: user
17+
password: pass
18+
container:
19+
registries:
20+
- username: dockerhubuser
21+
password: dockerhubpassword
22+
- username: privateuser
23+
password: privatepassword
24+
url: https://myprivateregistry.tld
25+
services:
26+
- name: app
27+
image: getstackhead/project-demo-php
28+
user: "1000:1000"
29+
volumes:
30+
- type: global
31+
src: assets
32+
dest: /var/www/public/assets
33+
- type: local
34+
src: log
35+
dest: /var/www/public/log
36+
- type: custom
37+
src: /etc/secrets.txt
38+
dest: /var/www/secrets.txt
39+
mode: ro
40+
- name: db
41+
image: mariadb:10.5
42+
environment:
43+
MYSQL_ROOT_PASSWORD: example
44+
hooks:
45+
execute_after_setup: ./some-file.sh
46+
execute_before_destroy: ./some-file.sh

ansible/schemas/module-config.schema.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,19 @@
4040
"definitions": {
4141
"prop-type": {
4242
"type": "string",
43-
"enum": ["container", "plugin", "webserver"]
43+
"enum": ["container", "plugin", "webserver","dns"]
4444
}
4545
},
4646
"allOf": [
4747
{
48-
"if": {"properties": {"type": {"const": "plugin"}}},
49-
"else": {
48+
"if": {"properties": {"type": {"const": "webserver"}}},
49+
"then": {
50+
"required": ["terraform"]
51+
}
52+
},
53+
{
54+
"if": {"properties": {"type": {"const": "container"}}},
55+
"then": {
5056
"required": ["terraform"]
5157
}
5258
}

ansible/schemas/project-definition.schema.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@
2020
"type": "string",
2121
"description": "Domain name without protocols or slashes"
2222
},
23+
"dns": {
24+
"type": "object",
25+
"items": {
26+
"properties": {
27+
"provider": {
28+
"type": "string",
29+
"description": "Name of provider module to use"
30+
}
31+
}
32+
}
33+
},
2334
"security": {
2435
"type": "object",
2536
"$ref": "project-definition/security.json"

0 commit comments

Comments
 (0)