sftp: init and access API with a token
This commit is contained in:
@@ -9,6 +9,7 @@ var apps = require('./apps.js'),
|
||||
assert = require('assert'),
|
||||
async = require('async'),
|
||||
debug = require('debug')('box:sftp'),
|
||||
hat = require('./hat.js'),
|
||||
infra = require('./infra_version.js'),
|
||||
safe = require('safetydance'),
|
||||
shell = require('./shell.js'),
|
||||
@@ -43,6 +44,7 @@ function rebuild(callback) {
|
||||
|
||||
const tag = infra.images.sftp.tag;
|
||||
const memoryLimit = 256;
|
||||
const cloudronToken = hat(8 * 128);
|
||||
|
||||
apps.getAll(function (error, result) {
|
||||
if (error) return done(error);
|
||||
@@ -94,6 +96,7 @@ function rebuild(callback) {
|
||||
--dns-search=. \
|
||||
-p 222:22 \
|
||||
${appDataVolumes} \
|
||||
-e CLOUDRON_SFTP_TOKEN="${cloudronToken}" \
|
||||
-v "/etc/ssh:/etc/ssh:ro" \
|
||||
--label isCloudronManaged=true \
|
||||
--read-only -v /tmp -v /run "${tag}"`;
|
||||
|
||||
Reference in New Issue
Block a user