Add docker test container

This commit is contained in:
David Luhmer 2017-05-26 22:34:31 +02:00
parent e92ffe6dab
commit 0bad40e4e4
4 changed files with 60 additions and 0 deletions

View file

@ -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

View file

@ -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/

View file

@ -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"

View file

@ -0,0 +1,9 @@
<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot /var/www/html/
# ServerName *
SSLEngine on
SSLCertificateFile /nextcloud.cert
SSLCertificateKeyFile /nextcloud.key
</VirtualHost>
</IfModule>