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
/
Copy pathAcornfile
109 lines (96 loc) · 2.25 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: "Minio"
description: "Minio is an S3 compatible object storage server"
readme: "./README.md"
info: localData.info
icon: "./icon.png"
args: bucketName: "bucket"
services: admin: {
generated: job: "setup"
default: true
}
containers: minio: {
image: images["minio-img"].image
ports: [
"9000/http",
"9001/http",
]
env: {
MINIO_ROOT_USER: "secret://root-user/username"
MINIO_ROOT_PASSWORD: "secret://root-user/password"
}
dirs: {
"/data": "volume://minio-data"
}
command: [
"server",
"/data",
"--address",
":9000",
"--console-address",
":9001",
]
sidecars: {
"volume-init": {
image: images["minio-img"].image
init: true
dirs: {
"/data": "volume://minio-data"
}
entrypoint: [
"sh",
"-c",
"mkdir -p /data/\(args.bucketName)",
]
}
}
}
jobs: setup: {
name: "Set Minio API Keys"
image: images["minio-img"].image
dirs: "/acorn/scripts/": "./scripts"
dependsOn: ["minio"]
entrypoint: ["/acorn/scripts/render.sh"]
env: {
MINIO_ROOT_USER: "secret://root-user/username"
MINIO_ROOT_PASSWORD: "secret://root-user/password"
MINIO_ACCESS_KEY: "secret://api-key/username"
MINIO_SECRET_KEY: "secret://api-key/password"
BUCKET_NAME: args.bucketName
}
}
secrets: "root-user": {
type: "basic"
data: {
username: "minio"
password: ""
}
}
secrets: "api-key": {
type: "basic"
params: {
passwordCharacters: "[a-zA-Z0-9]"
passwordLength: 32
usernameCharacters: "[a-zA-Z0-9]"
usernameLength: 16
}
}
volumes: "minio-data": {}
images: "minio-img": image: "index.docker.io/minio/minio:RELEASE.2024-01-11T07-46-16Z"
localData: info: """
## Usage
```aml
services: bucket: image: "ghcr.io/acorn-io/minio:*"
containers: app: {
image: "app-image"
consumes: ["bucket"]
env: {
AWS_ACCESS_KEY_ID: "@{@{service.}bucket.secrets.api-key.username}"
AWS_SECRET_ACCESS_KEY: "@{@{service.}bucket.secrets.api-key.username}"
ENDPOINT_URL: "@{@{service.}bucket.data.proto}@{@{service.}bucket.address}:@{@{service.}bucket.ports.9000}/@{@{service.}bucket.data.name}"
}
}
```
If you would like to use a standard ports for the bucket service you can use:
@{@{service.}bucket.ports.443}
@{@{service.}bucket.ports.80}
"""