Commit Graph

711 Commits

Author SHA1 Message Date
Girish Ramakrishnan 804947f039 use dir mount instead of file mount
file mounting is fraught with problems wrt change notifications.

first, we must be carefule that the inode does not change.

second, changes outside container do not result in fs events inside the container.
haraka cache settings files and relies on fs events. So, even
though the file gets updated inside the container, haraka doesn't
see it.

https://github.com/docker/docker/issues/15793
2017-01-17 23:59:23 -08:00
Girish Ramakrishnan d45927cdf4 unbound: listen on 0.0.0.0 2017-01-13 15:22:54 -08:00
Girish Ramakrishnan 055e41ac90 Make unbound reply on cloudron network
Because of the docker upgrade, dnsbl queries are failing again
since we are not using the unbound server from the containers.

For some reason, docker cannot query 127.0.0.1 (https://github.com/docker/docker/issues/14627).

Make unbound listed on the cloudron network and let docker proxy
DNS calls to unbound (docker always use the embedded DNS server
when using UDN).

See also #130
2017-01-12 19:28:23 -08:00
Johannes Zellner 1c9f2495e3 Show the detailed backup progress during update
Fixes #157
2017-01-12 16:00:34 +01:00
Girish Ramakrishnan b4477d26b7 Reload the docker service file 2017-01-11 15:40:16 -08:00
Girish Ramakrishnan ce0afb3d80 Explicitly specify the storage driver as devicemapper
For reasons unknown, the images build by the buildbot (which currently
uses btrfs), does not work with devicemapper.

Existing cloudrons with aufs will not be affected because docker will
just ignore it.

devmapper: Base device already exists and has filesystem xfs on it. User specified filesystem will be ignored.

Existing AUFS users can move to devicemapper either by restoring to
a new cloudron (recommended) OR
* systemctl stop box
* systemctl stop docker
* rm -rf /var/lib/docker
* Edit /home/yellowtent/data/INFRA_VERSION. Change the "version" field to "1"
* systemctl start docker
* systemctl start box # this will download images all over

Fixes #182
2017-01-11 14:53:11 -08:00
Girish Ramakrishnan 4c719de86c restart docker only if config changed 2017-01-10 18:50:21 -08:00
Girish Ramakrishnan 6f2b2adca9 Enable apparmor explicitly 2017-01-10 18:15:10 -08:00
Johannes Zellner 9b9d30c092 Remove commented out section of the nginx.conf 2017-01-11 00:09:51 +01:00
Girish Ramakrishnan 26ed331f8e Add default clients in clients.js 2017-01-09 15:41:29 -08:00
Johannes Zellner fd479d04a0 Fix nginx config to make non vhost configs default_server
Nginx does not match on the ip as a vhost. This no basically replaces
the commented out section in the nginx.conf
2017-01-06 22:09:10 +01:00
Girish Ramakrishnan cc9904c8c7 Move nginx config and cert generation to box code 2017-01-06 10:23:10 +01:00
Johannes Zellner 2d6d8a7ea8 Create fallback certs only if fqdn is already set 2017-01-05 16:29:10 +01:00
Johannes Zellner 5b5ed9e043 Always create box/mail/dkim folder 2017-01-05 16:15:00 +01:00
Johannes Zellner 801c40420c Create setup nginx config and cert for ip setup 2017-01-05 16:02:03 +01:00
Johannes Zellner d9865f9b0f Allow box to startup without fqdn 2017-01-05 14:02:04 +01:00
Girish Ramakrishnan c8a9412995 suppress error message 2016-12-30 14:23:16 -08:00
Girish Ramakrishnan 90c1fd4c31 rename the service to cloudron-resize-fs 2016-12-30 11:27:00 -08:00
Girish Ramakrishnan fad6221750 Run cloudron-system-setup before box 2016-12-30 11:23:53 -08:00
Johannes Zellner 7d06f9e1e3 Add comment why the script might fail on unsupported small disks 2016-12-30 11:53:35 +01:00
Johannes Zellner 1e4e76b0dd give disk size a unit in cloudron-system-setup.sh 2016-12-30 11:49:57 +01:00
Girish Ramakrishnan 7eaa3ef52e Use the ejs-cli of the new box code 2016-12-29 19:17:31 -08:00
Girish Ramakrishnan 81a60b029d bash is dangerous (script_dir was marked readonly in parent script!) 2016-12-29 15:34:30 -08:00
Girish Ramakrishnan decbfe0505 More start.sh cleanup 2016-12-29 14:35:48 -08:00
Girish Ramakrishnan 379042616f Ensure box.service starts after mysql.service 2016-12-29 14:24:29 -08:00
Girish Ramakrishnan df2878bc2e Prettify start.sh 2016-12-29 14:22:42 -08:00
Girish Ramakrishnan 1ff35461a2 Remove obsolete design doc 2016-12-29 13:21:09 -08:00
Girish Ramakrishnan 7de94fff1b Merge container logic into start.sh
This whole container thinking is over-engineered and we will get to
it if and when we need to.
2016-12-29 12:01:59 -08:00
Girish Ramakrishnan bbd63b2c57 Prettify container.sh 2016-12-28 08:59:26 -08:00
Girish Ramakrishnan b1854f82f2 prettify init base image script 2016-12-28 08:59:25 -08:00
Girish Ramakrishnan 61789e3fda Use the installer.sh from the source tarball
This redesigns how update works. installer.sh now rebuild the package,
stops the old code and starts the new code. Importantly, it does not
download the new package, this is left to the caller. cloudron-setup
downloads the code and calls installer.sh of the downloaded code.
Same goes for updater.sh. This means that installer.sh itself is now
easily updatable.

Part of #152
2016-12-28 08:59:07 -08:00
Girish Ramakrishnan 691f6c7c5c Use docker 1.12.5
Docker uses an embedded DNS server (127.0.0.11) for user defined networks (UDN).

With the latest releases of docker, specifying 127.0.0.1 as --dns makes the
containers resolve 127.0.0.1 _inside_ the container's networking namespace
(not sure how it worked before this).

The next idea was to only specify --dns-search=. but this does not work.
This makes docker setup the containers to use 127.0.0.1 (or 127.0.0.11 for UDN).
In my mind, the UDN case should work but doesn't (not sure why).

So, the solution is to simply go with no --dns or --dns-search. Sadly,
setting dns-search just at container level does not work either :/ Strangely,

    docker run --network=cloudron --dns-search=. appimage  # does not work

    docker run --network=cloudron appimage # works if you manually remove search from /etc/resolv.conf

So clearly, something inside docker triggers when one of the dns* options is set.

This means that #130 has to be fixed at app level (For Go, this means to use the cgo resolver).
2016-12-28 08:57:48 -08:00
Girish Ramakrishnan 91e4f6fcec Add CLOUDRON chain first
This allows us to not issue an 'upgrade' yet.

Part of #152
2016-12-28 08:57:38 -08:00
Girish Ramakrishnan b759b12e90 Move cloudron-system-setup.sh out of installer
Part of #152
2016-12-28 08:57:30 -08:00
Girish Ramakrishnan 103019984b Move firewall setup to container.sh
Part of #152
2016-12-28 08:57:20 -08:00
Girish Ramakrishnan 01126aaeea move ssh configuration to container.sh
Note: appstore requires to be fixed to start the provisioning on port 22

Part of #152
2016-12-28 08:57:13 -08:00
Girish Ramakrishnan a6ab8ff02f Mount the btrfs user home data in container.sh
This allows it to be configurable easily at some point

Part of #152
2016-12-28 08:56:55 -08:00
Girish Ramakrishnan b89886a945 Move systemd service creation scripts to container.sh
Part of #152
2016-12-28 08:56:46 -08:00
Girish Ramakrishnan d12b71f69c move journald configuration to container.sh
Part of #152
2016-12-28 08:56:06 -08:00
Girish Ramakrishnan 53c2ed3c82 configure time in container.sh 2016-12-28 08:55:56 -08:00
Girish Ramakrishnan 148c8e6250 Give user access to system logs in container.sh
Part of #152
2016-12-28 08:55:43 -08:00
Johannes d39a84ea53 Do not redirect on app upstream error but show static error page
Fixes #4
2016-11-21 16:25:23 +01:00
Girish Ramakrishnan 94037e5266 remove oauth proxy backend logic 2016-11-19 17:13:08 +05:30
Johannes 4d360e3798 Allow update.sh to be run as root 2016-11-06 14:29:41 +01:00
Girish Ramakrishnan c8a04f8707 remove code that stops nginx 2016-10-24 14:41:26 -07:00
Johannes 595787a898 Add missing 'then' 2016-10-24 16:46:14 +02:00
Girish Ramakrishnan 86a31b8f5a start nginx properly 2016-10-21 16:43:40 -07:00
Girish Ramakrishnan 1244a73a19 run the install web ui on port 80 2016-10-21 16:04:08 -07:00
Johannes Zellner 723c7307d2 Set default provider to generic 2016-10-21 10:28:40 -07:00
Johannes Zellner db55a7ad3c Create fallback cert if not passed in via user data 2016-10-21 10:28:22 -07:00