Git Product home page Git Product logo

fleet-docker-traefik's Introduction

Fleet Docker Deployment

A quick and easy method for creating a production-ready FleetDM environment using only Docker Compose.

Services

  • MySQL
  • Redis
  • Fleet
  • Traefik

Configuration Files

All services are configured using the default.env file included in the folder for that service.

Fleet configuration details

Bare bones version of Fleet with filesystem logging options.

Data persistence

All data is stored on the host machine in the folder for the service it is associated with. Data will persist after the restart as long as the local folder is not deleted. Can be changed in docker-compose.yml

Usage

  • Clone this repository
  • Move to desired location
  • From root of repo, run "docker compose up"

Please make sure to edit fleet/default.env and mysql/default.env and replace the example passwords with secure ones. Especially if you intend to make your instance publicly available.

TLS

This repository includes two basic examples of how to enable TLS based on traefik.

To be able to expose the installation, please make sure that:

  • Ports 80 and 443 are open/reachable
  • A DNS entry exists that points to your host (A-record pointing to fleet.example.com)

Standalone setup

This approach includes a traefik container with the required configuration in the docker-compose file docker-compose-standalone.yml.

To create a TLS-based instance of Fleet, a few steps are required:

# Create required directories
mkdir fleet/{logs,vulndb} mysql/data
# Fix permissions
sudo chmod -R o+w fleet/{logs,vulndb} mysql/data
chmod 600 config/ACME/acme.json
# Create the docker network for the edge router
docker network create traefik_proxy
# Edit the docker-compose file and replace `fleet.example.com` with the DNS record that targets your host
nano -w docker-compose-traefik-standalone.yml
# Edit the traefik config file and replace `[email protected]` with your email address
nano -w config/traefik.toml
# Launch the instance
docker compose -f docker-compose-traefik-standalone.yml up -d --force-recreate && docker compose -f docker-compose-traefik-standalone.yml logs -f

External traefik stack

It is the recommended procedure to run traefik in a separate docker-compose stack. This way, multiple docker-compose projects can share a common traefik edge router.

Feel free to get inspired by this example repository for the traefik stack: https://github.com/cbirkenbeul/docker-homelab/tree/master/compose-files-traefik-predefined/traefik

Once your traefik instance is up and running, there are only a few steps required to deploy fleet:

# Create required directories
mkdir fleet/{logs,vulndb} mysql/data
# Fix permissions
sudo chmod -R o+w fleet/{logs,vulndb} mysql/data
# Edit the docker-compose file and replace `fleet.example.com` with the DNS record that targets your host
nano -w docker-compose-traefik.yml
# Launch the instance
docker compose -f docker-compose-traefik.yml up -d --force-recreate && docker compose -f docker-compose-traefik.yml logs -f

fleet-docker-traefik's People

Contributors

apiening avatar ksatter avatar manasiwibi avatar spokanemac 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.