Commit Graph

160 Commits

Author SHA1 Message Date
Girish Ramakrishnan
872705d58d oidc: use the cloudron name as provider name 2024-12-02 12:01:19 +01:00
Girish Ramakrishnan
ca5776e6f3 services: fix oidc usage 2024-12-02 11:00:12 +01:00
Girish Ramakrishnan
22be1f1b72 sqlite: create dumps based on the basename 2024-11-21 12:34:06 +05:30
Girish Ramakrishnan
7095862601 sqlite: add some comments 2024-11-21 12:24:27 +05:30
Girish Ramakrishnan
fa98e0570f sqlite: change path to paths 2024-11-21 10:02:26 +05:30
Girish Ramakrishnan
4316d3eade add sqlite3 addon take 2
- there is no container id during the addon lifecycle
- sqlite3 requires the localstorage addon to be inited. so this has to
  become like the ftp option
- remove all that child_process streaming stuff. too complicated
2024-11-21 00:13:17 +05:30
Girish Ramakrishnan
f8cd0b5f52 add sqlite3 addon 2024-11-21 00:13:17 +05:30
Girish Ramakrishnan
df5ba25010 shell: add explicit bash() function 2024-10-16 10:40:17 +02:00
Girish Ramakrishnan
6c3ca9c364 shell: rework code to use shell.spawn
spawn gives out streams and we have more control over the stdout/stderr
buffers. otherwise, we have to provide a max buffer capture size to exec
2024-10-15 12:13:46 +02:00
Girish Ramakrishnan
a9e1d7641d shell: make require take a tag 2024-10-14 21:08:32 +02:00
Johannes Zellner
6056ba6475 Another missing check for manifest.addons 2024-07-27 11:56:36 +02:00
Johannes Zellner
01945675ed Check if addons exists in database import 2024-07-22 16:45:13 +02:00
Girish Ramakrishnan
a99a8ef382 services: fix crash because of missing safe() 2024-07-08 10:30:10 +02:00
Girish Ramakrishnan
345f9541fe mongodb: do not apply memory limit when no avx 2024-06-23 21:06:30 +02:00
Girish Ramakrishnan
e98a1a9767 docker container can use system dns
only mail container needs unbound for dnsbl
2024-04-29 15:48:30 +02:00
Girish Ramakrishnan
cd5cae33ce dns: switch over to systemd for the host
this changes unbound to listen to 127.0.0.150 (150 is roman CL)

we cannot only bind on docker bridge because unbound is relied
upon for the initial domain setup. docker itself is only initialized
when the platform initializes
2024-04-29 11:06:03 +02:00
Johannes Zellner
daa8a60da2 oidc: Inject currently hardcoded CLOUDRON_OIDC_PROVIDER_NAME env var
This is designed to be used in the packages for the login button:
"Login with ${CLOUDRON_OIDC_PROVIDER_NAME}"
2024-04-17 15:06:22 +02:00
Johannes Zellner
21d7438bbe proxyauth: user OpenID instead of basic auth 2024-04-15 15:59:16 +02:00
Girish Ramakrishnan
0a748ac78a better AVX error message 2024-04-15 10:10:13 +02:00
Girish Ramakrishnan
efd0be5e2c services: send the default memory limit 2024-04-10 12:42:25 +02:00
Girish Ramakrishnan
be2775e12e memoryLimit: redefine to not include swap
Currently, we allocate 50% as RAM and 50% as swap. The manifest is
usually quite conservative on memory values. This means that we set
up a system where the app is applying memory pressure almost immediately.
This then swaps things randomly and increases cpu usage (kswapd shows
up in the profile).

To rethink the whole situation: we should not cap apps with a swap limit at all.
The memory hard limit is what is important. By redefining memoryLimit , we are
doubling every container's memory and it's good that we over allocate this.
2024-04-09 18:59:40 +02:00
Girish Ramakrishnan
de99b8ecce Fix AVX support edge cases
* Always show restart button. When using a local VM, you can dynamically
switch flags. So, let the user rebuild. Show error if we cannot.
* The logs button is an "a" tag which is clickable despite ng-disabled
2024-04-01 23:05:20 +02:00
Girish Ramakrishnan
1c4f6315a6 mongodb: optional avx support in service routes 2024-04-01 17:31:20 +02:00
Girish Ramakrishnan
774f14327c addons: optional start mongodb based on AVX 2024-03-30 19:20:24 +01:00
Girish Ramakrishnan
781ee77280 services: remove docker dynamic env hook 2024-03-30 18:25:37 +01:00
Girish Ramakrishnan
104997d77c syslog: change it to unix domain socket
docker is using a extra udp port for every container. when there is
a lot of containers, a lot of random udp ports get used up. this causes
problems when installing apps that require contiguous port ranges
2024-03-21 18:59:08 +01:00
Johannes Zellner
96eeb70076 Update postgres addon to 1.5.10
This contains a hack for immich in apptask to migrate the extension on
immich app update
2024-03-06 13:20:58 +01:00
Johannes Zellner
eadc4fda30 Optional VectorRS is gone 2024-03-03 12:40:04 +01:00
Girish Ramakrishnan
3ff8f5cb33 scheduler: proper crash when app is still being installed 2024-03-01 10:38:49 +01:00
Girish Ramakrishnan
b6162a3bef docker addon: env var can be stored in the db 2024-03-01 10:31:41 +01:00
Girish Ramakrishnan
3316dd1f42 fixup various shell usage 2024-02-28 18:59:45 +01:00
Girish Ramakrishnan
64bb53abc3 services: startTurn needs a shell 2024-02-28 16:02:42 +01:00
Girish Ramakrishnan
73d1860995 turn: remove quotes 2024-02-28 13:00:29 +01:00
Johannes Zellner
e3f31e6560 Ensure we keep the oidc secret on app update 2024-02-26 17:20:00 +01:00
Girish Ramakrishnan
13e62bc738 logs: use stream.destroy() instead of custom hooks 2024-02-24 17:35:37 +01:00
Girish Ramakrishnan
0e83658aa3 make sudo commands terminate properly
sudo forks and execs the program. sudo also hangs around as the parent of the program waiting on the program and also forwarding signals.
sudo does not forward signals when the originator comes from the same process group. recently, there has been a change where it will
forward signals as long as sudo or the command is not the group leader (https://www.sudo.ws/repos/sudo/rev/d1bf60eac57f)
for us, this means that calling kill from this node process doesn't work since it's in the same group (and ubuntu 22 doesn't have the above fix).
the workaround is to invoke a kill from a different process group and this is done by starting detached
another idea is: use "ps --pid cp.pid -o pid=" to get the pid of the command and then send it signal directly

see also: https://dxuuu.xyz/sudo.html
2024-02-24 16:19:07 +01:00
Girish Ramakrishnan
d0dc104ede logs: make logPaths work
we have to tail via sudo script

Fixes #811
2024-02-23 17:46:22 +01:00
Girish Ramakrishnan
60994f9ed1 shell: docker run needs shell
don't want to get into parsing quotes!
2024-02-22 10:59:39 +01:00
Girish Ramakrishnan
a6f078330f shell: no need to promise scoping 2024-02-21 19:40:27 +01:00
Girish Ramakrishnan
14c9260ab0 shell: exec encoding is utf8 by default and no shell
explicitly mark calls that require the shell
2024-02-21 17:47:25 +01:00
Girish Ramakrishnan
26eb739b46 shell: add options to exec 2024-02-20 21:11:09 +01:00
Johannes Zellner
66da8dd4dc Always resetup oidc client record for apps 2024-02-15 12:40:58 +01:00
Johannes Zellner
38e32942cb oidc: remove env var for disabled session/end route 2024-02-09 19:37:54 +01:00
Johannes Zellner
7499aa9201 Do not fail is we don't have a servicesConfig yet 2024-01-17 13:13:48 +01:00
Johannes Zellner
b7631689b0 Add useVectorRsExtension for postgresql service 2024-01-16 12:53:43 +01:00
Girish Ramakrishnan
bf381aff7f redis: use default instead of redisuser
suggested at https://github.com/redis/node-redis/issues/1591
2023-11-14 10:50:25 +01:00
Girish Ramakrishnan
6830c4fc67 redis: fix issue when restoring optional redis 2023-10-11 14:53:25 +05:30
Girish Ramakrishnan
c1a53f7b29 oidc: loginRedirectUri can be empty string
this is required for ttrss
2023-09-20 14:47:27 +05:30
Girish Ramakrishnan
253f509fc6 redis: set default memory limit to 256M
The 'reset to default' functionality in services view has 256M hardcoded
2023-09-04 18:22:57 +05:30
Girish Ramakrishnan
eee49a8291 move dashboard setting into dashboard.js 2023-08-11 21:04:10 +05:30