mirror of
https://git.cloudron.io/cloudron/minio-app
synced 2025-09-03 07:45:20 +00:00
Compare commits
298 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4f43bc611e | ||
|
db768973d6 | ||
|
db0d84862d | ||
|
0e70c439cf | ||
|
59ed1a0fc1 | ||
|
6542475614 | ||
|
9cffe692df | ||
|
eeac9f0af4 | ||
|
b1fe43b656 | ||
|
eb93b292fa | ||
|
aea86c627d | ||
|
454d83318c | ||
|
fed871de22 | ||
|
648231e821 | ||
|
927cdbb0a2 | ||
|
cb61faa569 | ||
|
cf11bcd7e6 | ||
|
669976c293 | ||
|
951a874909 | ||
|
0bb46d9867 | ||
|
540ad857fd | ||
|
c06f2d9e9d | ||
|
0d96abc3c8 | ||
|
63f6910f5f | ||
|
b09a9cc6ea | ||
|
b0f6a030f3 | ||
|
84b4ebeac4 | ||
|
c5404f53c1 | ||
|
cacf9d9441 | ||
|
3b1eecfd73 | ||
|
237a7747d9 | ||
|
ce4f12fbd6 | ||
|
7e14939670 | ||
|
1de078ee2a | ||
|
533b6d91e6 | ||
|
ef4bdec677 | ||
|
da470851f7 | ||
|
242ed4386b | ||
|
11bb0c8edc | ||
|
4ac71ff8e7 | ||
|
05cbddd40e | ||
|
1ecb2e3593 | ||
|
124bc9e833 | ||
|
c5a3a190b2 | ||
|
97e6ae5a6f | ||
|
dfa728d7a5 | ||
|
f06d703fce | ||
|
c78df06cb7 | ||
|
87859252ce | ||
|
9ef74c45d5 | ||
|
e551d6535d | ||
|
9a97ef5913 | ||
|
ac937559e0 | ||
|
3b4e8d04de | ||
|
4d3cd5ed61 | ||
|
9e5aa33e09 | ||
|
4f3e70f3e0 | ||
|
270a7cd6ee | ||
|
da87188fad | ||
|
16df482288 | ||
|
0524be735e | ||
|
a4451ecb22 | ||
|
f452505ae7 | ||
|
1fe052d819 | ||
|
ba1a52dc5e | ||
|
5b7a96134f | ||
|
1366fc8932 | ||
|
d9bdf5749e | ||
|
2c30861af0 | ||
|
37157e6538 | ||
|
38e110edc7 | ||
|
758b98fc20 | ||
|
b92644ffdd | ||
|
3b9e31f363 | ||
|
17d5977c74 | ||
|
d898eba22e | ||
|
9c6a787df9 | ||
|
9f4fc4c2f2 | ||
|
2f271c7db9 | ||
|
30f7bbf53b | ||
|
b246112d3f | ||
|
986df393a1 | ||
|
d5b3bd9c2f | ||
|
c1ce6031f7 | ||
|
9c5f6b5636 | ||
|
7fa5fa0427 | ||
|
55711af940 | ||
|
7a3ee2504f | ||
|
c2388d2710 | ||
|
81186e53f4 | ||
|
f37fd6a660 | ||
|
365254e971 | ||
|
665851a84a | ||
|
a625014aeb | ||
|
25ff8b66f6 | ||
|
2fbefac3a9 | ||
|
2bbf11f795 | ||
|
ca3aebef4a | ||
|
effb90c2ac | ||
|
e8972242ca | ||
|
e84ef0cddf | ||
|
594b45051d | ||
|
ed8e041180 | ||
|
f9c0870c59 | ||
|
550ea43e59 | ||
|
832f1f26a8 | ||
|
293beffadc | ||
|
29f3101513 | ||
|
ef6edee2a1 | ||
|
e00e95eb94 | ||
|
f6a78ee7cb | ||
|
c32fc59b39 | ||
|
78913a6f02 | ||
|
9964fd0db8 | ||
|
86ebec77eb | ||
|
281ec626e3 | ||
|
6f76e442fc | ||
|
c720de4dcf | ||
|
32a649b52a | ||
|
08f1230582 | ||
|
eda4dd653f | ||
|
d49de43f6b | ||
|
d385379da8 | ||
|
40f6e1675d | ||
|
19d114beda | ||
|
13329afe50 | ||
|
8feb8dd0e3 | ||
|
1370d93592 | ||
|
d24e4b9896 | ||
|
b279130d74 | ||
|
3504fc48f9 | ||
|
1ac3bbe134 | ||
|
fe7fd0147c | ||
|
0047b6bd3b | ||
|
b4e59c928c | ||
|
d33cff8f0a | ||
|
4eb440baaf | ||
|
96e54e6b3c | ||
|
bfbe792135 | ||
|
31bbeed39f | ||
|
9a175b6685 | ||
|
a6e36be63d | ||
|
9a348b2de6 | ||
|
c696512b49 | ||
|
cc1385c856 | ||
|
89a6b2407b | ||
|
36d5d82e88 | ||
|
8252a3ee75 | ||
|
c71586f092 | ||
|
09408ff9d4 | ||
|
661c07147e | ||
|
02d58cec8b | ||
|
e43de3a0e0 | ||
|
e391ed9d85 | ||
|
2c9a35effb | ||
|
9ee3f02a10 | ||
|
15f02a8d0f | ||
|
48ffc5257c | ||
|
7fad1aea6d | ||
|
aeb58c292f | ||
|
bcee168e84 | ||
|
150b220bf2 | ||
|
43403829eb | ||
|
75b4da6645 | ||
|
e0f1511552 | ||
|
338371b948 | ||
|
efa30f5115 | ||
|
90fa9036cb | ||
|
15b4ed267b | ||
|
67294dd890 | ||
|
aad0197fff | ||
|
b4a820e079 | ||
|
20cc0c935f | ||
|
b7f575fcf9 | ||
|
7f3a0acab2 | ||
|
6e9d718f4c | ||
|
00b781abe3 | ||
|
4800f84077 | ||
|
d6fc505561 | ||
|
b95c494758 | ||
|
2fc891a5ea | ||
|
f65641edce | ||
|
79b941eb4c | ||
|
f55d0e6b40 | ||
|
2c423db822 | ||
|
a6352ab7d8 | ||
|
01d9c176ce | ||
|
0828f5a2e8 | ||
|
d4341084da | ||
|
a6a23d7023 | ||
|
b3bc027a10 | ||
|
d2a23f97ce | ||
|
d1fa4ee583 | ||
|
3bacd89adc | ||
|
a8805259b5 | ||
|
bcf271abc9 | ||
|
101195f02f | ||
|
bd58749e91 | ||
|
19ff6a62a4 | ||
|
b0d5963549 | ||
|
3d98790d90 | ||
|
a0a9824424 | ||
|
966be1a13e | ||
|
00f3eb3d69 | ||
|
fce20e1783 | ||
|
f18c49de7b | ||
|
7de060613a | ||
|
466dcff1d8 | ||
|
73ebc5b10e | ||
|
352f9250d3 | ||
|
f92fc952af | ||
|
b3b18d1b18 | ||
|
ffedc9db25 | ||
|
d8064088ce | ||
|
695806c300 | ||
|
1a3a0f18b9 | ||
|
f8f48ee71c | ||
|
381c362e84 | ||
|
e064370467 | ||
|
88cf43708d | ||
|
e83c637e08 | ||
|
f48251e55c | ||
|
b0edebfba8 | ||
|
4f76314872 | ||
|
12c3b3ec2c | ||
|
7298aad053 | ||
|
3c4b7290db | ||
|
33803ec2d6 | ||
|
acbc45a26f | ||
|
78abd09c30 | ||
|
4898a75d5b | ||
|
251f8d18a5 | ||
|
4174832c63 | ||
|
c95b7ec69c | ||
|
765ac6c810 | ||
|
68e6b92c08 | ||
|
49190b074c | ||
|
7e29cf3ca6 | ||
|
3dc1454fd7 | ||
|
08ee194809 | ||
|
a95014bef5 | ||
|
6f8c2823a3 | ||
|
e0a95c19f3 | ||
|
add3c0728c | ||
|
ab082d612a | ||
|
b732aa9833 | ||
|
e68520b2cd | ||
|
83a9ffe9bd | ||
|
56e76c6098 | ||
|
4172a77c28 | ||
|
62b482f6de | ||
|
a3e521d243 | ||
|
7b5a6629b3 | ||
|
0b3787bb4c | ||
|
4485660f19 | ||
|
198a7ba2d8 | ||
|
694ea1a835 | ||
|
ae7b78e2d7 | ||
|
f5b85c7dfa | ||
|
6148966516 | ||
|
9967b12167 | ||
|
5574cc464a | ||
|
794538bbe9 | ||
|
a1e5589dca | ||
|
f7d9d69187 | ||
|
2762522066 | ||
|
4c6b99857c | ||
|
6c788ded2d | ||
|
542b8a4412 | ||
|
4b3b4b9d4d | ||
|
a0c9c76bd8 | ||
|
d23b35e1b8 | ||
|
32684767b6 | ||
|
ad93f49467 | ||
|
52b7e49b44 | ||
|
ab20e34d26 | ||
|
522cfeff67 | ||
|
d7b08ca48c | ||
|
058673d882 | ||
|
8c3ea72c86 | ||
|
74eea35e18 | ||
|
eafdc900b3 | ||
|
0ec3052ad8 | ||
|
c10b3888f0 | ||
|
8d2b9d84ce | ||
|
13a4de046d | ||
|
d030ce00cc | ||
|
a2ea852bd4 | ||
|
aeeb7473b9 | ||
|
a988358a84 | ||
|
76e75b2421 | ||
|
51bd508a5e | ||
|
4e042bb62f | ||
|
00fc4851bc | ||
|
fb0dae799d | ||
|
a68bdeeade | ||
|
c1dbd2139f | ||
|
fe88ff7d1c |
@@ -5,9 +5,10 @@
|
||||
"description": "file://DESCRIPTION.md",
|
||||
"changelog": "file://CHANGELOG",
|
||||
"tagline": "Distributed object storage",
|
||||
"version": "2.4.7",
|
||||
"upstreamVersion": "2022-04-01T03-41-39Z",
|
||||
"version": "3.12.6",
|
||||
"upstreamVersion": "2024-01-29T03-56-32Z",
|
||||
"healthCheckPath": "/minio/login",
|
||||
"memoryLimit": 805306368,
|
||||
"httpPort": 8000,
|
||||
"httpPorts": {
|
||||
"API_SERVER_DOMAIN": {
|
||||
|
12
Dockerfile
12
Dockerfile
@@ -1,16 +1,16 @@
|
||||
FROM cloudron/base:3.2.0@sha256:ba1d566164a67c266782545ea9809dc611c4152e27686fd14060332dd88263ea
|
||||
FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4
|
||||
|
||||
RUN mkdir -p /app/code
|
||||
WORKDIR /app/code
|
||||
|
||||
ARG VERSION=RELEASE.2022-04-01T03-41-39Z
|
||||
ARG MC_VERSION=RELEASE.2022-04-01T23-44-48Z
|
||||
ARG VERSION=RELEASE.2024-01-29T03-56-32Z
|
||||
|
||||
# sometimes here https://dl.min.io/server/minio/release/linux-amd64/archive/
|
||||
RUN wget https://dl.min.io/server/minio/release/linux-amd64/minio.${VERSION} -O /app/code/minio && chmod +x /app/code/minio
|
||||
# RUN wget https://dl.min.io/server/minio/release/linux-amd64/minio.${VERSION} -O /app/code/minio && chmod +x /app/code/minio
|
||||
RUN wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio.${VERSION} -O /app/code/minio && chmod +x /app/code/minio
|
||||
# https://dl.min.io/client/mc/release/linux-amd64/
|
||||
RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc.${MC_VERSION} -O /app/code/mc && chmod +x /app/code/mc
|
||||
RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc -O /app/code/mc && chmod +x /app/code/mc
|
||||
|
||||
COPY env.sh minio-credentials start.sh /app/code/
|
||||
COPY env.sh start.sh /app/code/
|
||||
|
||||
CMD [ "/app/code/start.sh" ]
|
||||
|
@@ -37,3 +37,8 @@ PATH=$PATH:node_modules/.bin mocha --bail test.js
|
||||
## Notes
|
||||
|
||||
MinIO Console is an embedded web-based object browser built into MinIO Server
|
||||
|
||||
## Multi-domain
|
||||
|
||||
MINIO_DOMAIN=domain.com env var can be set to server DNS style requests as bucket.domain.com . This requires the platform code to set aliases for the httpPorts and not the primaryport.
|
||||
|
||||
|
@@ -1,41 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
const MINIO_CONFIG = '/app/data/data/.minio.sys/config/config.json';
|
||||
|
||||
function usage() {
|
||||
console.log('Usage:\n');
|
||||
console.log('\tminio-credentials get');
|
||||
console.log('\tminio-credentials set <access key> <secret key>');
|
||||
console.log();
|
||||
}
|
||||
|
||||
let config = JSON.parse(fs.readFileSync(MINIO_CONFIG, 'utf8'));
|
||||
let adminCredentials = config['credentials']['_'];
|
||||
let accessKey = adminCredentials.filter(kv => kv.key === 'access_key')[0];
|
||||
let secretKey = adminCredentials.filter(kv => kv.key === 'secret_key')[0];
|
||||
|
||||
if (process.argv[2] === 'get') {
|
||||
console.log('Access Key:', accessKey.value);
|
||||
console.log('Secret Key:', secretKey.value);
|
||||
} else if (process.argv[2] === 'set') {
|
||||
if (process.argv.length !== 5) return usage();
|
||||
|
||||
// https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateAccessKey.html
|
||||
if (process.argv[4].length < 5) return console.log('secret key must be atleast 5 characters');
|
||||
if (!/^[\w+=,.@-]+$/.test(process.argv[3])) return console.log('access key has invalid characters');
|
||||
|
||||
accessKey.value = process.argv[3];
|
||||
if (process.argv[4].length < 8) return console.log('secret key must be atleast 8 characters');
|
||||
|
||||
secretKey.value = process.argv[4];
|
||||
|
||||
fs.writeFileSync(MINIO_CONFIG, JSON.stringify(config), 'utf8');
|
||||
console.log('Credentials updated. Restart minio app for new credentials to take effect.\n');
|
||||
} else {
|
||||
usage();
|
||||
}
|
||||
|
6
start.sh
6
start.sh
@@ -4,11 +4,12 @@ set -eu
|
||||
|
||||
mkdir -p /app/data/data /run/minio/config /run/minio/certs
|
||||
|
||||
# env vars take precedence over config.yaml (https://github.com/minio/minio/blob/master/docs/distributed/CONFIG.md#things-to-know)
|
||||
[[ ! -f /app/data/env.sh ]] && cp /app/code/env.sh /app/data/env.sh
|
||||
source /app/data/env.sh
|
||||
|
||||
# https://docs.min.io/minio/baremetal/reference/minio-server/minio-server.html#envvar.MINIO_SERVER_URL
|
||||
[[ -n "${API_SERVER_DOMAIN:-}" ]] && export MINIO_SERVER_URL="https://${API_SERVER_DOMAIN}"
|
||||
export MINIO_SERVER_URL="https://${API_SERVER_DOMAIN}"
|
||||
export MINIO_BROWSER_REDIRECT_URL="https://${CLOUDRON_APP_DOMAIN}"
|
||||
|
||||
if [[ ! -d /app/data/mc_config ]]; then
|
||||
@@ -20,7 +21,6 @@ fi
|
||||
echo "==> Changing ownership"
|
||||
[[ $(stat --format '%U' /app/data/data) != "cloudron" ]] && chown -R cloudron:cloudron /app/data
|
||||
|
||||
# the --config-dir is deprecated and not used. but without it, minio will try to create $HOME/.minio :/ same for --certs-dir
|
||||
echo "==> Starting minio"
|
||||
exec /usr/local/bin/gosu cloudron:cloudron /app/code/minio --certs-dir /run/minio/certs --config-dir /run/minio/config --quiet ${CLOUDRON_MINIO_STARTUP_ARGS} --address :9000 --console-address :8000
|
||||
exec /usr/local/bin/gosu cloudron:cloudron /app/code/minio --quiet ${CLOUDRON_MINIO_STARTUP_ARGS} --address :9000 --console-address :8000
|
||||
|
||||
|
1025
test/package-lock.json
generated
1025
test/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,10 +9,10 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"chromedriver": "^100.0.0",
|
||||
"chromedriver": "^121.0.0",
|
||||
"expect.js": "^0.3.1",
|
||||
"mocha": "^9.2.2",
|
||||
"selenium-webdriver": "^4.1.1",
|
||||
"superagent": "^7.1.1"
|
||||
"mocha": "^10.2.0",
|
||||
"selenium-webdriver": "^4.17.0",
|
||||
"superagent": "^8.1.2"
|
||||
}
|
||||
}
|
||||
|
37
test/test.js
37
test/test.js
@@ -16,6 +16,7 @@ const execSync = require('child_process').execSync,
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
superagent = require('superagent'),
|
||||
timers = require('timers/promises'),
|
||||
{ Builder, By, until } = require('selenium-webdriver'),
|
||||
{ Options } = require('selenium-webdriver/chrome');
|
||||
|
||||
@@ -23,7 +24,7 @@ describe('Application life cycle test', function () {
|
||||
this.timeout(0);
|
||||
|
||||
const LOCATION = 'test';
|
||||
const TEST_TIMEOUT = 10000;
|
||||
const TEST_TIMEOUT = 30000;
|
||||
const BUCKET = 'cloudrontestbucket';
|
||||
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
||||
|
||||
@@ -53,25 +54,29 @@ describe('Application life cycle test', function () {
|
||||
await waitForElement(By.id('accessKey'));
|
||||
await browser.findElement(By.id('accessKey')).sendKeys(accessKey);
|
||||
await browser.findElement(By.id('secretKey')).sendKeys(secretKey);
|
||||
await browser.findElement(By.xpath('//button[contains(text(), "Login")]')).click();
|
||||
await waitForElement(By.xpath('//h4[contains(text(), "Buckets")]'));
|
||||
await browser.findElement(By.xpath('//button[@id="do-login"]')).click();
|
||||
await waitForElement(By.xpath('//span[contains(text(), "Buckets")]'));
|
||||
await timers.setTimeout(5000);
|
||||
}
|
||||
|
||||
async function logout() {
|
||||
await browser.get(`https://${app.fqdn}/`);
|
||||
await waitForElement(By.xpath('//h4[contains(text(), "Buckets")]'));
|
||||
await browser.findElement(By.xpath('//div/span[contains(text(), "Logout")]')).click();
|
||||
await waitForElement(By.xpath('//span[contains(text(), "Buckets")]'));
|
||||
const button = await browser.findElement(By.xpath('//button[@id="sign-out"]'));
|
||||
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
||||
await button.click();
|
||||
await waitForElement(By.id('accessKey'));
|
||||
}
|
||||
|
||||
async function addBucket() {
|
||||
await browser.get(`https://${app.fqdn}/buckets`);
|
||||
await waitForElement(By.xpath('//button/span[text()="Create Bucket"]'));
|
||||
await browser.findElement(By.xpath('//button/span[text()="Create Bucket"]')).click();
|
||||
await waitForElement(By.xpath('//button[@id="create-bucket"]'));
|
||||
await browser.findElement(By.xpath('//button[@id="create-bucket"]')).click();
|
||||
await browser.sleep(2000);
|
||||
await browser.findElement(By.xpath('//input[@id="bucket-name"]')).sendKeys(BUCKET);
|
||||
await browser.findElement(By.xpath('//button[text()="Create Bucket"]')).click();
|
||||
await waitForElement(By.xpath(`//a[contains(text(), "${BUCKET}")]`));
|
||||
await browser.findElement(By.xpath('//button[@id="create-bucket"]')).click();
|
||||
await waitForElement(By.xpath(`//h1[contains(text(), "${BUCKET}")]`));
|
||||
await timers.setTimeout(5000);
|
||||
}
|
||||
|
||||
async function checkBucket() {
|
||||
@@ -92,7 +97,10 @@ describe('Application life cycle test', function () {
|
||||
}
|
||||
|
||||
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
||||
it('install app', function () { execSync(`cloudron install --location ${LOCATION} --secondary-domains API_SERVER_DOMAIN=${LOCATION}-api`, EXEC_ARGS); });
|
||||
it('install app', async function () {
|
||||
execSync(`cloudron install --location ${LOCATION} --secondary-domains API_SERVER_DOMAIN=${LOCATION}-api`, EXEC_ARGS);
|
||||
await timers.setTimeout(10000);
|
||||
});
|
||||
|
||||
it('can get app information', getAppInfo);
|
||||
|
||||
@@ -102,7 +110,7 @@ describe('Application life cycle test', function () {
|
||||
it('does redirect', checkRedirect);
|
||||
it('check api', checkApi);
|
||||
|
||||
it('can change credentials', function () {
|
||||
it('can change credentials', async function () {
|
||||
let data = fs.readFileSync(path.join(__dirname, '../env.sh'), 'utf8');
|
||||
data = data
|
||||
.replace(/MINIO_ROOT_USER=.*/, 'MINIO_ROOT_USER=minioakey')
|
||||
@@ -110,6 +118,7 @@ describe('Application life cycle test', function () {
|
||||
fs.writeFileSync('/tmp/env.sh', data);
|
||||
execSync(`cloudron push --app ${app.id} /tmp/env.sh /app/data/env.sh`, EXEC_ARGS);
|
||||
execSync(`cloudron restart --app ${app.id}`, EXEC_ARGS);
|
||||
await timers.setTimeout(10000);
|
||||
});
|
||||
|
||||
it('can restart app', function () { execSync(`cloudron restart --app ${app.id}`, EXEC_ARGS); });
|
||||
@@ -121,12 +130,13 @@ describe('Application life cycle test', function () {
|
||||
it('check api', checkApi);
|
||||
|
||||
it('backup app', function () { execSync('cloudron backup create --app ' + app.id, EXEC_ARGS); });
|
||||
it('restore app', function () {
|
||||
it('restore app', async function () {
|
||||
const backups = JSON.parse(execSync(`cloudron backup list --raw --app ${app.id}`));
|
||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||
execSync('cloudron install --location ' + LOCATION, EXEC_ARGS);
|
||||
getAppInfo();
|
||||
execSync(`cloudron restore --backup ${backups[0].id} --app ${app.id}`, EXEC_ARGS);
|
||||
await timers.setTimeout(10000);
|
||||
});
|
||||
|
||||
it('can login', login.bind(null, 'minioakey', 'minioskey'));
|
||||
@@ -135,9 +145,10 @@ describe('Application life cycle test', function () {
|
||||
it('does redirect', checkRedirect);
|
||||
it('check api', checkApi);
|
||||
|
||||
it('move to different location', function () {
|
||||
it('move to different location', async function () {
|
||||
browser.manage().deleteAllCookies();
|
||||
execSync('cloudron configure --location ' + LOCATION + '2', EXEC_ARGS);
|
||||
await timers.setTimeout(10000);
|
||||
});
|
||||
it('can get app information', getAppInfo);
|
||||
|
||||
|
Reference in New Issue
Block a user