Skip to content

Commit 67cbdf0

Browse files
committed
Added minio to infra samples
1 parent bb67d45 commit 67cbdf0

File tree

8 files changed

+93
-0
lines changed

8 files changed

+93
-0
lines changed

infra/minio/config/config.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"version": "8",
3+
"hosts": {
4+
"local": {
5+
"url": "http://localhost:9000",
6+
"accessKey": "JX6SNZEW2CLYM66UDHT7",
7+
"secretKey": "NHtuFRcy8XnRuqbASsHTK65oxYMQ7sNvwTnA1oX0",
8+
"api": "S3v4"
9+
},
10+
"minio": {
11+
"url": "http://minio:9000",
12+
"accessKey": "JX6SNZEW2CLYM66UDHT7",
13+
"secretKey": "NHtuFRcy8XnRuqbASsHTK65oxYMQ7sNvwTnA1oX0",
14+
"api": "s3v4"
15+
}
16+
}
17+
}

infra/minio/config/config.json.old

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"version": "8",
3+
"hosts": {
4+
"gcs": {
5+
"url": "https://storage.googleapis.com",
6+
"accessKey": "YOUR-ACCESS-KEY-HERE",
7+
"secretKey": "YOUR-SECRET-KEY-HERE",
8+
"api": "S3v2"
9+
},
10+
"local": {
11+
"url": "http://localhost:9000",
12+
"accessKey": "",
13+
"secretKey": "",
14+
"api": "S3v4"
15+
},
16+
"play": {
17+
"url": "https://play.minio.io:9000",
18+
"accessKey": "Q3AM3UQ867SPQQA43P2F",
19+
"secretKey": "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG",
20+
"api": "S3v4"
21+
},
22+
"s3": {
23+
"url": "https://s3.amazonaws.com",
24+
"accessKey": "YOUR-ACCESS-KEY-HERE",
25+
"secretKey": "YOUR-SECRET-KEY-HERE",
26+
"api": "S3v4"
27+
}
28+
}
29+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"version": "1",
3+
"shares": {}
4+
}

infra/minio/config/share/uploads.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"version": "1",
3+
"shares": {}
4+
}

infra/minio/data

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../data/

infra/minio/docker-compose.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: '3'
2+
services:
3+
minio:
4+
image: minio/minio
5+
command: server /data
6+
volumes:
7+
- minio1:/data
8+
networks: [block]
9+
ports:
10+
- 9000:9000
11+
environment:
12+
MINIO_ACCESS_KEY: JX6SNZEW2CLYM66UDHT7
13+
MINIO_SECRET_KEY: NHtuFRcy8XnRuqbASsHTK65oxYMQ7sNvwTnA1oX0
14+
15+
networks:
16+
block:
17+
18+
volumes:
19+
minio1:
20+

infra/minio/mc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -eou pipefail
3+
4+
readonly MC=(docker run -v "$(PWD)/data":/data -v "$(PWD)/config":/root/.mc --network="host" -ti minio/mc)
5+
6+
if [[ $# -lt 1 ]]; then
7+
>&2 ${MC[@]}
8+
exit 1
9+
fi
10+
11+
${MC[@]} $@
12+

infra/minio/mirror.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
set -eou pipefail
3+
readonly BUCKET=local/data
4+
./mc mb -p "${BUCKET}"
5+
./mc mirror --remove data "${BUCKET}"
6+

0 commit comments

Comments
 (0)