Merge pull request #166 from nextcloud/play-with-docker
Add Play with Docker button
This commit is contained in:
commit
da970232b5
@ -14,6 +14,8 @@ The `apache` tag contains a full Nextcloud installation including an apache web
|
||||
|
||||
The second option is a `fpm` container. It is based on the [php-fpm](https://hub.docker.com/_/php/) image and runs a fastCGI-Process that serves your Nextcloud page. To use this image it must be combined with any webserver that can proxy the http requests to the FastCGI-port of the container.
|
||||
|
||||
[![Try in PWD](https://github.com/play-with-docker/stacks/raw/cff22438cb4195ace27f9b15784bbb497047afa7/assets/images/button.png)](http://play-with-docker.com?stack=https://raw.githubusercontent.com/nextcloud/docker/dba66a2d18b1020f6de6e22defd1b5e6df87c894/stack.yml)
|
||||
|
||||
## Using the apache image
|
||||
The apache image contains a webserver and exposes port 80. To start the container type:
|
||||
|
||||
|
53
stack.yml
Normal file
53
stack.yml
Normal file
@ -0,0 +1,53 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres
|
||||
restart: always
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_DB=nextcloud
|
||||
- POSTGRES_USER=nextcloud
|
||||
- POSTGRES_PASSWORD=nextcloud
|
||||
|
||||
app:
|
||||
image: nextcloud
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:80
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
environment:
|
||||
- POSTGRES_HOST=db
|
||||
- POSTGRES_DB=nextcloud
|
||||
- POSTGRES_USER=nextcloud
|
||||
- POSTGRES_PASSWORD=nextcloud
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
cron:
|
||||
image: nextcloud
|
||||
restart: always
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
user: www-data
|
||||
entrypoint: |
|
||||
bash -c 'bash -s <<EOF
|
||||
trap "break;exit" SIGHUP SIGINT SIGTERM
|
||||
|
||||
while [ ! -f /var/www/html/config/config.php ]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
while true; do
|
||||
php -f /var/www/html/cron.php
|
||||
sleep 15m
|
||||
done
|
||||
EOF'
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
volumes:
|
||||
db:
|
||||
nextcloud:
|
Loading…
Reference in New Issue
Block a user