Giter VIP home page Giter VIP logo

docker-nginx-nextcloud-grav's Introduction

Nextcloud and Grav behind nginx with Lets Encrypt and automatic configuration

This is a setup with nextcloud and grav, exposed behind a nginx proxy with automatic handling of TLS certificates for secure https traffic. Certificates and configuration of the nginx-proxy will be automatically handled, and you can easily add more services.

How to deploy

To deploy this setup, edit the database password in db.env and run the following commands from the root folder;

./setup -d example.com -e [email protected]
docker-compose up

You can also pass the cloud and blog subdomains via the -c and -w parameters.

If you want more then a basic nextcloud-only installation, specify it through the -t parameter. Note that only nextcloud- and grav+nextcloud are currently available.

For production, the ACME_CA_URI must environment variable should be removed from the docker-compose file. If you don't, correct certificates will not be issued.

How to add services

To add another service exposed through a port(e.g. via apache/nginx/lighttpd), follow the grav example. To add another service exposed through a php-only container, follow the nextcloud example.

After adding another server, simply run docker-compose up again to deploy the new service.

Backup

If you want to backup parts of you installation, inspect the settings for the volume containing the data you want to backup. Usually, the volumes are mapped to folders under /var/lib/docker/volumes. Some tips for backuptargets are the db, grav and nextcloud volumes.

Start with another grav-skeleton

To use another Grav-skeleton as a basis, just edit the GRAV_URL and GRAV_FOLDER in the start.sh. While the default is grav + admin plugin, you might also want to use e.g. a blog skeleton. Just find the url, and find out which folder it unzips.

Inspiration

This setup has been heavily inspired by yobasystems/alpine-grav, the nextcloud/docker example on docker-compose with postgres and fpm and jwidler/nginx-proxy for the automatically configured nginx.

Things to note

In fpmcron/nextcloud.example.com, there are multiple root directives. This is because the general directive is for the volume mounted in the nginx proxy container(static files), while the root directive under the location directive is for the message to the php-fpm process running in the nextcloud container. So if you either get the message 'File not found' when you go to your cloud url, or the static files such as images don't load, check these two directives.

While the grav container should probably be able to run as a pure fpm container, like nextcloud, I have kept it like this for the sake of providing examples for both a nginx-fpm container and a fpm-container.

docker-nginx-nextcloud-grav's People

Contributors

oddsund avatar thomaco avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.