Merge pull request #33 from nextcloud/adjust-readme

adjust the readme and fix the mastercontainer
This commit is contained in:
szaimen 2021-12-03 13:26:36 +01:00 committed by GitHub
commit a5a149b9c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 24 deletions

View file

@ -28,7 +28,8 @@ RUN curl "https://caddyserver.com/api/download?os=linux&arch=amd64" -o "/usr/bin
RUN cd /var/www/docker-aio; \
git clone https://github.com/nextcloud/all-in-one.git .; \
chmod 770 -R ./
chmod 770 -R ./; \
chown www-data:www-data -R ./
RUN mkdir -p /etc/apache2/certs && \
cd /etc/apache2/certs && \

View file

@ -2,6 +2,6 @@
set -eu
while true; do
php /var/www/docker-aio/php/src/Cron/cron.php
sudo -u www-data php /var/www/docker-aio/php/src/Cron/cron.php
sleep 1d
done

View file

@ -10,27 +10,17 @@ print_green() {
if ! [ -a "/var/run/docker.sock" ]; then
echo "Docker socket is not available. Cannot continue."
exit 1
elif ! test -r /var/run/docker.sock; then
elif ! sudo -u www-data test -r /var/run/docker.sock; then
echo "Trying to fix docker.sock permissions internally..."
GROUP="$(stat -c '%g' /var/run/docker.sock)"
groupadd -g "$GROUP" docker && \
usermod -aG docker root
if ! test -r /var/run/docker.sock; then
echo "Docker socket is not readable by the root user. Cannot continue."
usermod -aG docker www-data
if ! sudo -u www-data test -r /var/run/docker.sock; then
echo "Docker socket is not readable by the www-data user. Cannot continue."
exit 1
fi
fi
# Adjust permissions for all instances
chown root:root -R /mnt/docker-aio-config
chmod 770 -R /mnt/docker-aio-config
# Check if volume is writeable
if ! [ -w /mnt/docker-aio-config ]; then
echo "/mnt/docker-aio-config is not writeable."
exit 1
fi
# Check if api version is supported
API_VERSION_FILE="$(find ./ -name DockerActionManager.php | head -1)"
API_VERSION="$(grep -oP 'const API_VERSION.*\;' "$API_VERSION_FILE" | grep -oP [0-9]+.[0-9]+ | head -1)"
@ -50,6 +40,14 @@ fi
mkdir -p /mnt/docker-aio-config/data/
mkdir -p /mnt/docker-aio-config/session/
mkdir -p /mnt/docker-aio-config/caddy/
mkdir -p /mnt/docker-aio-config/certs/
# Adjust permissions for all instances
chmod 770 -R /mnt/docker-aio-config
chown www-data:www-data -R /mnt/docker-aio-config/data/
chown www-data:www-data -R /mnt/docker-aio-config/session/
chown root:root -R /mnt/docker-aio-config/caddy/
chown root:root -R /mnt/docker-aio-config/certs/
# Adjust certs
GENERATED_CERTS="/mnt/docker-aio-config/certs"

View file

@ -20,17 +20,12 @@ Included are:
```
curl -fsSL get.docker.com | sudo sh
```
2. Make sure that the docker group has the correct groupid:
```
sudo groupmod -g 998 docker
```
3. Make sure to pull the latest image:
2. Make sure to pull the latest image:
```
sudo docker pull nextcloud/all-in-one:latest
```
4. Run the following command in order to start the container:
3. Run the following command in order to start the container:
```
sudo docker run -it \
@ -43,7 +38,7 @@ sudo docker run -it \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest
```
5. After the initial startup, you should be able to open the Nextcloud AIO Interface now on port 8080 of this server.<br>
4. After the initial startup, you should be able to open the Nextcloud AIO Interface now on port 8080 of this server.<br>
E.g. https://internal.ip.of.this.server:8080<br>
If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatially by opening the Nextcloud AIO Interface via:<br>
https://your-domain-that-points-to-this-server.tld:8443