From 0bad40e4e4ba647c13e41f952d7b5752f6819cae Mon Sep 17 00:00:00 2001 From: David Luhmer Date: Fri, 26 May 2017 22:34:31 +0200 Subject: [PATCH] Add docker test container --- docker-nextcloud-test-instances/Dockerfile | 11 ++++++++ docker-nextcloud-test-instances/README.md | 12 ++++++++ .../docker-compose.yaml | 28 +++++++++++++++++++ .../ssl_config.append | 9 ++++++ 4 files changed, 60 insertions(+) create mode 100644 docker-nextcloud-test-instances/Dockerfile create mode 100644 docker-nextcloud-test-instances/README.md create mode 100644 docker-nextcloud-test-instances/docker-compose.yaml create mode 100644 docker-nextcloud-test-instances/ssl_config.append diff --git a/docker-nextcloud-test-instances/Dockerfile b/docker-nextcloud-test-instances/Dockerfile new file mode 100644 index 00000000..5a4ecdb3 --- /dev/null +++ b/docker-nextcloud-test-instances/Dockerfile @@ -0,0 +1,11 @@ +FROM nextcloud + +RUN openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \ + -subj "/C=DE/ST=NRW/L=Test/O=David-Development/CN=*" \ + -keyout /nextcloud.key -out /nextcloud.cert + +COPY ssl_config.append /etc/apache2/sites-available/nextcloud.conf + +RUN a2ensite nextcloud.conf +RUN a2enmod rewrite +RUN a2enmod ssl diff --git a/docker-nextcloud-test-instances/README.md b/docker-nextcloud-test-instances/README.md new file mode 100644 index 00000000..bac1de01 --- /dev/null +++ b/docker-nextcloud-test-instances/README.md @@ -0,0 +1,12 @@ +Start image with: + +``` +docker-compose up --build +``` + + +Default Port is 80 (for HTTP) and 443 (for HTTPS). +NextCloud IP = Your Host IP + +URL in Nextcloud Android App: +e.g. https://192.168.0.1/ diff --git a/docker-nextcloud-test-instances/docker-compose.yaml b/docker-nextcloud-test-instances/docker-compose.yaml new file mode 100644 index 00000000..8a93b731 --- /dev/null +++ b/docker-nextcloud-test-instances/docker-compose.yaml @@ -0,0 +1,28 @@ +version: '2' + +volumes: + nextcloud: + db: + +services: + db: + image: mariadb + restart: always + volumes: + - db:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD=nextcloud + - MYSQL_USER_PW=nextcloud + - MYSQL_DATABASE=nextcloud + - MYSQL_USER=nextcloud + + app: + build: ./ + links: + - db + volumes: + - nextcloud:/var/www/html + restart: always + ports: + - "80:80" + - "443:443" diff --git a/docker-nextcloud-test-instances/ssl_config.append b/docker-nextcloud-test-instances/ssl_config.append new file mode 100644 index 00000000..1024275b --- /dev/null +++ b/docker-nextcloud-test-instances/ssl_config.append @@ -0,0 +1,9 @@ + + + DocumentRoot /var/www/html/ + # ServerName * + SSLEngine on + SSLCertificateFile /nextcloud.cert + SSLCertificateKeyFile /nextcloud.key + +