Giter VIP home page Giter VIP logo

compose's Introduction

compose

Collection of compose files

Most of the compose files use docker volumes (docker.com) to store persistent data for containers. Only configuration files are binding to the host.

int-docker-net

All the compose files use a default network called int-docker-net.

This references an externally created docker network, created using:

docker network create int-docker-net

Reverse Proxy

The containers get exposed using traefik Proxy (traefik.io).

Only the traefik and portainer services bind directly to the host machine.

Treafik Labels

A list of commonly used labels to expose a service using treafik. These labels are appended to the service configuration in the docker-compose.yml.

    labels:
      # enable treafik discovery for this service
      - traefik.enable=true
      # set entrypoint to http
      #  - traefik.http.routers.<NAME>.entrypoints=web
      # set entrypoint to https
      - traefik.http.routers.<NAME>.entrypoints=websecure
      # bind to a domain or multiple ones using (`DOMAIN`, `DOMAIN2`)
      - traefik.http.routers.<NAME>.rule=Host(`<DOMAIN>`)
      # enable tls
      - traefik.http.routers.<NAME>.tls=true
      # set cert server
      - traefik.http.routers.<NAME>.tls.certresolver=production
    # enable authelia for service, make sure service is in authelia config
    #  - traefik.http.routers.<NAME>.middlewares=authelia@file

This line - traefik.http.routers.changedetection.middlewares=authelia@file references a middleware service authelia. See the traefik/traefik.yml file, under the section # MIDDLEWARES to see how it is configured.

Logging

Disable

Disable logging for a container in the docker compose file.

    logging:
      driver: none

Limit

https://docs.docker.com/compose/compose-file/compose-file-v3/#logging

    logging:
      options:
        max-size: "200k"
        max-file: "10"

The example shown above would store log files until they reach a max-size of 200kB, and then rotate them. The amount of individual log files stored is specified by the max-file value. As logs grow beyond the max limits, older log files are removed to allow storage of new logs.

Delete Logs

Deletes all Logs for this container. Non-reversible. Can break logs.

truncate -s 0 $(docker inspect --format='{{.LogPath}}' <container_name_or_id>)

View Logs and Follow

docker compose logs -f <container name>

Using Graylog

    logging:
      driver: gelf
      options:
        # this references the static ip given to the graylog container
        # port is standard is a gelf udp note, created in web ui
        gelf-address: "udp://172.19.200.1:12201"
        tag: <service-name>

Using Json File

    logging:
      driver: json-file
      options:
        max-size: "200k"
        max-file: "10"

Update Running Compose stack

docker compose pull && docker compose down && docker compose up -d

Quick copy for sudo:

sudo docker compose pull && sudo docker compose down && sudo docker compose up -d

compose's People

Stargazers

 avatar

Watchers

 avatar

compose's Issues

Create ratings for services

List of services with rating

  • authelia
  • changedetection
  • dendrite
  • freshrss
  • grafana
  • it-tools
  • mediawiki
  • nginx-proxy-manager
  • openproject
  • picoshare
  • portainer
  • postgresql
  • privatebin
  • rocketchat
  • stirling-pdf
  • teamspeak3server
  • traefik
  • traefik+authelia
  • umami
  • whiteboard

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.