Commit Graph

692 Commits

Author SHA1 Message Date
Girish Ramakrishnan
d2a3925e04 add altDomain to install route 2016-04-26 14:45:58 -07:00
Girish Ramakrishnan
c581d2a52c stash altDomain in oldConfig 2016-04-25 21:22:08 -07:00
Girish Ramakrishnan
19948851e0 return altDomain as the app.fqdn if present 2016-04-25 10:52:12 -07:00
Girish Ramakrishnan
3d5aa9fd23 pass altDomain in configure route 2016-04-25 10:52:12 -07:00
Girish Ramakrishnan
5c1970b37f Fix crash where portBindings is set to undefined 2016-04-15 21:27:42 -07:00
Girish Ramakrishnan
414b21f29a add sysadmin route test 2016-04-15 12:33:54 -07:00
Girish Ramakrishnan
322e9faee7 rework backup code
move all the backup code into backups.js
2016-04-10 20:41:08 -07:00
Girish Ramakrishnan
af9d489395 backup apps use aws-cli 2016-04-10 18:47:25 -07:00
Girish Ramakrishnan
d839f0b762 remove redundant session token 2016-04-03 23:23:23 -07:00
Girish Ramakrishnan
f8c683f451 Disallow updating an app with mismatching manifest id
Story so far:
1. App installed from store. appStoreId is set to manifest.id.
2. User installed a custom built app with a custom manifest.id using cloudron install --app <id>. The appStoreId is still set.
3. When we make a new release, it overrides the users install.

The fix (for now) is:
1. Do not allow mismatching ids to start with.
2. When forced, it is allowed but appStoreId is cleared so as to not get any auto updates.

This leaves the user vulnerable to 'cloudron uninstall' simply autoselecting this new app.
For this, they have to simply disable CLI mode for now.

There is also a corner case where:
1. Dev installs from app store
2. Dev compiles from source and updates on top of app store install with --app <id>
3. Dev find out that his installation has auto-updated the next day.
2016-03-25 11:46:25 -07:00
Girish Ramakrishnan
3499a4cc6c move requiresOAuthProxy to nginx
we have 3 levels
    * routes, cron, apptask
    * everything else where everyone calls everyone :-)
    * the db layer
2016-03-17 11:38:29 -07:00
girish@cloudron.io
8b2903015d list app backups from db 2016-03-08 08:57:28 -08:00
Girish Ramakrishnan
4dd82d10ad backup: ensure same timestamp for app data and config 2016-03-07 12:13:54 -08:00
Johannes Zellner
9688e4c124 Add apps.getAllByUser() 2016-02-25 11:28:29 +01:00
Johannes Zellner
86f14b0149 Thanks JS for being so value focused... 2016-02-19 17:23:09 +01:00
Johannes Zellner
351ddcb218 Fixup the unit tests 2016-02-19 16:29:29 +01:00
Johannes Zellner
85c92ab0b4 Remove oauthProxy from the apps.js api 2016-02-19 16:07:49 +01:00
Johannes Zellner
9e87fd0440 Add apps.requiresOAuthProxy() 2016-02-19 15:03:36 +01:00
Johannes Zellner
804464c304 Add apps.getByIpAddress() 2016-02-18 15:43:46 +01:00
Johannes Zellner
5f96d862ab Move default memory limit to constants.js 2016-02-14 12:13:49 +01:00
Johannes Zellner
79199bf023 Ensure we stash and restore the memoryLimit 2016-02-14 12:10:22 +01:00
girish@cloudron.io
5669d387af check app state before exec 2016-02-12 12:32:58 -08:00
Johannes Zellner
957f20a9a8 Always store the memory limit in the app db record and adjust on update if needed 2016-02-11 18:14:16 +01:00
Johannes Zellner
489ea3a980 Add memoryLimit validation 2016-02-11 17:39:15 +01:00
Johannes Zellner
75d22d7988 Introduce memoryLimit to apps routes 2016-02-11 17:00:21 +01:00
Johannes Zellner
5ea81d0fd3 Ensure default minimum memory limit 2016-02-10 12:30:19 +01:00
Johannes Zellner
19cbd1f394 Ensure we never go below 256mb memoryLimit 2016-02-10 12:30:19 +01:00
Johannes Zellner
eec8708249 Set memory limit on app installation to the default or the one specified in the manifest 2016-02-10 12:25:26 +01:00
girish@cloudron.io
bfdabf9272 check groups property in accessRestriction 2016-02-09 13:03:52 -08:00
girish@cloudron.io
60988ff7f3 make hasAccessTo take a callback 2016-02-09 12:48:21 -08:00
girish@cloudron.io
1fb26bc441 make startAppTask take a callback 2016-02-09 12:14:04 -08:00
girish@cloudron.io
e6d23a9701 stop previous task explicitly
there is a race:
1. task is running
2. new task is created overwriting the installationState
3. new task kills the old task of step 1. this results in installationState getting overwritten by 'error' because of the sigkill
4. new task that is launched loses the installationState that was step in 2.
2016-02-09 12:09:20 -08:00
Johannes Zellner
28ffd01cf4 Invoke BACKUP_APP_CMD with the additional backupConfig.url 2016-01-29 11:55:52 +01:00
Johannes Zellner
d2ed816f44 Add apps.listBackups() 2016-01-19 13:35:18 +01:00
girish@cloudron.io
55799ebb2d cli tool demuxes stream now 2016-01-18 21:36:05 -08:00
girish@cloudron.io
fdf4d8fdcf maybe stream is duplex 2016-01-18 13:39:18 -08:00
girish@cloudron.io
7ef3d55cbf add tty option to exec 2016-01-18 11:39:09 -08:00
Johannes Zellner
bebf480321 Use appdb.exists() instead of a apps.get() 2016-01-17 16:05:47 +01:00
Johannes Zellner
6ce6b96e5c Fix linter issues 2016-01-17 15:59:11 +01:00
Johannes Zellner
16a9cae80e Allow to specify the restore id 2016-01-17 15:50:20 +01:00
girish@cloudron.io
28baef8929 Go back to using docker exec in cloudron exec
The main issue is that multiple cloudron exec sessions do not
share the same rootfs. Which makes it annoying to debug.

We also have some nginx timeout which drops you out of exec
now and then resulting in loss of all state.
2016-01-15 15:24:46 -08:00
Johannes Zellner
a6eca44a0d Do not attempt to purchase an app if we dont have an appstore token 2015-12-31 09:15:27 +01:00
Girish Ramakrishnan
a4ea693c3c update superagent
the latest superchanged changed the meaning of 'error'. Previously,
error implied a network error. With the latest superagent, error means
a REST api error i.e 4xx, 5xx are flagged as errors.

error && !error.response means network error
2015-12-15 09:53:37 -08:00
Girish Ramakrishnan
cf80fd7dc5 rename certificatemanager 2015-12-11 12:24:52 -08:00
Girish Ramakrishnan
73d891b98e move validateCertificate to certificateManager 2015-12-10 20:38:49 -08:00
Girish Ramakrishnan
fe819f95ec always return logs regardless of state 2015-12-04 13:13:54 -08:00
Johannes Zellner
b9695b09cd Fix crash due to wrong AppsError usage 2015-11-25 13:49:20 +01:00
Johannes Zellner
3d80821203 Give correct feedback if an app cannot be found in the appstore 2015-11-13 10:35:29 +01:00
Girish Ramakrishnan
8f05917d97 delete container on network error 2015-11-10 21:56:17 -08:00
Girish Ramakrishnan
3766d67daa create new container from cloudron exec 2015-11-10 21:36:20 -08:00