This repository has been archived by the owner on Mar 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Acornfile
94 lines (84 loc) · 1.61 KB
/
Acornfile
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
name: "Redis Acorn"
description: "Acorn providing Redis"
readme: "./README.md"
info: localData.info
icon: "./icon.png"
args: {
}
services: db: {
default: true
container: "redis"
secrets: ["admin"]
ports: "6379"
}
containers: {
redis: {
name: "Redis"
description: "Container running a Redis server"
image: "redis:7.2.4-alpine"
entrypoint: ["redis-server", "--aclfile", "/etc/users.acl"]
ports: "6379/tcp"
files: {
"/etc/users.acl": "secret://users-acl/template"
}
dirs: {
"/data": "volume://db-data"
}
probes: [
{
type: "liveness"
initialDelaySeconds: 10
timeoutSeconds: 5
tcp: {
url: "tcp://localhost:6379"
}
},
{
type: "readiness"
initialDelaySeconds: 10
exec: command: localData.readinessProbeCommand
},
]
}
}
volumes: {
"db-data": {}
}
secrets: {
admin: {
name: "password to be used for the admin user"
type: "token"
params: {
length: 16
characters: "abcdedfhifj01234567890"
}
data: token: ""
}
}
secrets: {
"users-acl": {
type: "template"
data: {
template: """
user default on >${secret://admin/token} ~* &* +@all
"""
}
}
}
localData: readinessProbeCommand: [
"/bin/sh",
"-c",
"redis-cli --pass ${secret://admin/token} ping",
]
localData: info: """
## Usage
services: db: image: "ghcr.io/acorn-io/redis:v#.#.#-#"
containers: app: {
image: "app-image"
env: {
DB_HOST: "@{@{service.}db.address}"
DB_PORT: "@{@{service.}db.port.6379}"
DB_PASS: "@{@{service.}db.secrets.admin.token}"
}
}
"""