Commit Graph

260 Commits

Author SHA1 Message Date
Girish Ramakrishnan 7b3b826f87 DNS fixes that work on all ubuntu versions 2020-11-23 00:27:17 -08:00
Girish Ramakrishnan 09c8248e31 move back docker network creation to start.sh
dockerproxy and unbound rely on it.
2020-11-20 17:22:57 -08:00
Girish Ramakrishnan c0b0029935 statically allocate app container IPs
We removed httpPort with the assumption that docker allocated IPs
and kept them as long as the container is around. This turned out
to be not true because the IP changes on even container restart.

So we now allocate IPs statically. The iprange makes sure we don't
overlap with addons and other CI app or JupyterHub apps.

https://github.com/moby/moby/issues/6743
https://github.com/moby/moby/pull/19001
2020-11-20 16:19:59 -08:00
Girish Ramakrishnan bd9c664b1a Free up port 53
It's all very complicated.

Approach 1: Simple move unbound to not listen on 0.0.0.0 and only the internal
ones. However, docker has no way to bind only to the "public" interface.

Approach 2: Move the internal unbound to some other port. This required a PR
for haraka - https://github.com/haraka/Haraka/pull/2863 . This works and we use
systemd-resolved by default. However, it turns out systemd-resolved with hog the
lo and thus docker cannot bind again to port 53.

Approach 3: Get rid of systemd-resolved and try to put the dns server list in
/etc/resolv.conf. This is surprisingly hard because the DNS listing can come from
DHCP or netplan or wherever. We can hardcode some public DNS servers but this seems
not a good idea for privacy.

Approach 4: So maybe we don't move the unbound away to different port after all.
However, all the work for approach 2 is done and it's quite nice that the default
resolver is used with the default dns server of the network (probably a caching
server + also maybe has some home network firewalled dns).

So, the final solution is to bind to the make docker bind to the IP explicity.
It's unclear what will happen if the IP changes, maybe it needs a restart.
2020-11-18 23:25:56 -08:00
Johannes Zellner b64acb412e Add cloudron-translation-update script 2020-11-18 23:16:42 +01:00
Girish Ramakrishnan b5823d3210 use legacy password scheme in mysql 8
https://github.com/db-migrate/node-db-migrate/issues/610

part of #684
2020-09-16 00:03:13 -07:00
Girish Ramakrishnan cd99c22f64 Fix collectd in focal
part of #684
2020-09-16 00:02:58 -07:00
Girish Ramakrishnan 20e206fa43 migrate blocklist to a txt file
this allows easy copy/pasting of existing deny lists which contain
comments and blank lines
2020-09-14 12:10:29 -07:00
Girish Ramakrishnan d752403ed6 mail: add API to get/set banner
part of #341
2020-08-24 08:56:13 -07:00
Girish Ramakrishnan f4a322478d cloudron.target is not needed 2020-08-01 20:00:20 -07:00
Johannes Zellner 0aab891980 Support nginx logs 2020-06-15 17:30:16 +02:00
Girish Ramakrishnan 5cd3df4869 better nginx config for higher loads 2020-05-25 15:25:00 -07:00
Girish Ramakrishnan e2d284797d set HOME explicity when calling migrate script 2020-05-17 21:50:50 -07:00
Girish Ramakrishnan 2e7630f97e remove stale logs 2020-05-13 19:23:04 -07:00
Girish Ramakrishnan e9d0ed8e1e Add binds support to containers 2020-04-29 22:51:46 -07:00
Girish Ramakrishnan 2cdf68379b Revert "add volume support"
This reverts commit b8bb69f730.

Revert this for now, we will try a simpler non-object volume first
2020-04-27 22:55:43 -07:00
Girish Ramakrishnan b8bb69f730 add volume support
part of #668, #569
2020-04-24 22:09:07 -07:00
Girish Ramakrishnan 2efa0aaca4 serve custom well-known documents via nginx 2020-04-09 00:15:56 -07:00
Girish Ramakrishnan 037440034b Move collectd logs to platformdata and rotate it 2020-02-18 20:36:50 -08:00
Johannes Zellner f2fca33309 Add support to upload custom profile avatar 2019-12-02 18:03:54 +01:00
Girish Ramakrishnan 05c64dcbf2 move unbound config to separate file 2019-11-13 14:48:56 -08:00
Girish Ramakrishnan 95c4a1f90c Handle db migration failure 2019-09-25 10:17:02 -07:00
Girish Ramakrishnan a737d2675e Fix logrotation rules
* explicitly specify the dirs that are getting rotated
* app log rules are now moved to logrotate.ejs
* we keep task logs for a week

Some testing notes:
* touch -d "10 days ago" foo
* logrotate /etc/logrotate.conf -v to test rotation. there is a state
file created in /var/lib/logrotate/status. If we have a 'daily' rule,
it will get processed only after a log line in status exists and it's atleast
1 day old timestamp.

https://github.com/logrotate/logrotate/blob/master/logrotate.c is quite
readable
2019-07-30 15:37:15 -07:00
Girish Ramakrishnan 18623fd9b7 cloudron.conf can be removed post migration 2019-07-26 14:55:36 -07:00
Girish Ramakrishnan 96f59d7cfe config: edition is long gone 2019-07-24 22:32:16 -07:00
Girish Ramakrishnan cb0352e33c Do not remove existing custom.yml 2019-06-06 11:24:19 -07:00
Girish Ramakrishnan 23280f1635 make custom.yml empty by default 2019-05-10 07:40:56 -07:00
Girish Ramakrishnan 33d5cb3061 initial features implementation 2019-05-07 10:29:47 -07:00
Girish Ramakrishnan f96a8bc269 remove config.edition
we will replace this with feature flags
2019-05-06 19:53:34 -07:00
Girish Ramakrishnan a0d1016c01 containerize sftp 2019-04-04 22:43:02 -07:00
Girish Ramakrishnan 384286cf0a cleanup stale redis directory
Fixes #627
2019-03-27 13:50:56 -07:00
Johannes Zellner 62ee3fa0f1 Verify proftp ldap connection via ip instead of fake admin account 2019-03-19 15:24:09 -07:00
Johannes Zellner ef0403af0e Make proftpd conf static 2019-03-19 15:24:09 -07:00
Johannes Zellner 044b27967e Make initial sftp connection work 2019-03-19 15:24:09 -07:00
Girish Ramakrishnan a435e88b25 rotate task logs 2019-03-18 22:53:47 -07:00
Girish Ramakrishnan b47069ccad typo 2019-03-09 21:33:56 -08:00
Girish Ramakrishnan 2051b3921b Use constants.ADMIN_LOCATION instead
part of #621
2019-03-09 20:06:12 -08:00
Girish Ramakrishnan 4428c3d7d8 Move docker config file generation to installer logic
the new version of docker does not support devicemapper on ubuntu 16.
so, we have to first enable overlay2 and then install the latest docker
2019-03-08 16:41:39 -08:00
Girish Ramakrishnan 7983ff5db2 Stash logs in crash log directory 2019-03-01 15:07:06 -08:00
Johannes Zellner f967116087 We do not require sudo to migrate the db 2019-01-22 19:38:18 +01:00
Girish Ramakrishnan a7fe35513a Ubuntu 16 needs MemoryLimit
systemd[1]: [/etc/systemd/system/box.service:25] Unknown lvalue 'MemoryMax' in section 'Service'
2019-01-17 09:28:35 -08:00
Girish Ramakrishnan 772fd1b563 Add cloudron-support to path 2018-12-26 19:42:45 -08:00
Girish Ramakrishnan 68a4769f1e Fix typo 2018-12-22 19:53:50 -08:00
Girish Ramakrishnan 5146e39023 contabo: fix DNS
we disable the DNS servers in initializeBaseImage. On normal VPS,
unbound seems to start by itself but on contabo it doesn't because
the default unbound config on ubuntu does not work without ip6
2018-12-21 11:44:39 -08:00
Girish Ramakrishnan 447c6fbb5f cloudron.conf has to writable 2018-12-14 16:32:51 -08:00
Girish Ramakrishnan 3137dbec33 CONFIG_DIR is not used anymore 2018-12-13 19:55:13 -08:00
Johannes Zellner b8f843993a Fix typo 2018-12-11 11:26:45 +01:00
Girish Ramakrishnan a76731a991 remove old cloudron.conf and version field 2018-12-10 15:36:00 -08:00
Girish Ramakrishnan 3688371ce8 Make tasks log to their own log file 2018-12-08 21:59:20 -08:00
Girish Ramakrishnan 840d78b2f4 run update as a task, so it is cancelable 2018-11-30 21:04:24 -08:00