Giter VIP home page Giter VIP logo

directus-docker-compose's Introduction

Self Host Directus on Docker Compose with SSL certificates provided by Let's Encrypt

Use this boilerplate at your own risk, not intended for production use.


This is a boilerplate for self hosting Directus on Docker Compose. It uses Nginx as a reverse proxy and Let's Encrypt to provide SSL certificates.

It is based on the official Directus Docker image and the Nginx Docker image.

The certbot configuration is taken from the nginx-certbot repository and the original article it's worth a read if you want to dive deeper: Nginx and Let’s Encrypt with Docker in Less Than 5 Minutes.

The script to validate the nginx configuration is taken from this article.


Prerequisites

You need to have Docker and Docker Compose installed on your machine.


Getting Started

clone this repo and edit the docker-compose.yml and the nginx/default.conf files to your needs.

# provision certificates
./init-letsencrypt.sh

# test nginx configuration
./test-nginx.sh

# start the containers
docker-compose up -d

Contributing

Feel free to open an issue or submit a pull request.

Things I would like to add:

  • Make Certbot optional, to work in development and simplify testing the setup
  • Add a script to automate the initial configuration
  • Add a script to select the directus extensions to install
  • Support other services like Laradock
  • Add Rsync scripts to easily move configuration and data between different hosts

Author

License

This project is open source and available under the MIT License.

Useful Commands

# start the containers
docker-compose up -d

# stop the containers
docker-compose down

# rebuild the containers
docker-compose up -d --build

# list containers
docker ps

# list all containers
docker ps -a

# list images
docker images

# list volumes
docker volume ls

# remove all containers
docker rm $(docker ps -a -q)

# remove all images
docker rmi $(docker images -q)

# remove all volumes
docker volume rm $(docker volume ls -q)

# remove all unused containers, volumes, networks and images
docker system prune

directus-docker-compose's People

Contributors

emidiotorre 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.