diff --git a/README.md b/README.md index f3784ec..34577e3 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/stack.yml b/stack.yml new file mode 100644 index 0000000..6fe1e2c --- /dev/null +++ b/stack.yml @@ -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 <