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 1
/
Copy pathAcornfile
72 lines (60 loc) · 1.49 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
name: "External Redis Server"
description: "Create an Acorn service from an existing Redis server"
readme: "./README.md"
info: localData.info
services: redis: {
generated: job: "create"
default: true
}
jobs: create: {
image: "alpine"
env: {
"secret://config": ""
}
dirs: {
"/acorn/scripts": "./scripts"
}
entrypoint: ["/acorn/scripts/render.sh"]
}
secrets: admin: {
type: "generated"
params: job: "create"
}
secrets: config: {
type: "credential.acorn.io/redis"
params: {
instructions: localData.instructions
promptOrder: ["proto", "address", "port", "adminUsername", "adminPassword", "dbName"]
}
data: {
address: ""
port: "6379"
adminUsername: ""
adminPassword: ""
proto: ""
dbName: ""
}
}
localData: instructions: """
## Overview
This will create the service from an existing Redis server.
## Instructions
fill in:
- address: the address of the Redis server endpoint (redis.example.com)
- port: the port of the Redis server (6379)
- adminPassword: the main password to use to connect to the Redis server as an admin
- proto: the protocol to use to connect to the Redis server.
- dbName: the name of the database to use
"""
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}"
}
}
"""