Add docker test container
This commit is contained in:
parent
e92ffe6dab
commit
0bad40e4e4
4 changed files with 60 additions and 0 deletions
11
docker-nextcloud-test-instances/Dockerfile
Normal file
11
docker-nextcloud-test-instances/Dockerfile
Normal 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
|
12
docker-nextcloud-test-instances/README.md
Normal file
12
docker-nextcloud-test-instances/README.md
Normal 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/
|
28
docker-nextcloud-test-instances/docker-compose.yaml
Normal file
28
docker-nextcloud-test-instances/docker-compose.yaml
Normal 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"
|
9
docker-nextcloud-test-instances/ssl_config.append
Normal file
9
docker-nextcloud-test-instances/ssl_config.append
Normal 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>
|
Loading…
Reference in a new issue