version: "3" networks: web: external: true services: app: image: chocobozzz/peertube:production-stretch restart: unless-stopped env_file: - .env environment: - PEERTUBE_WEBSERVER_HOSTNAME=${CHATONS_SERVICE:-peertube}.${CHATONS_DOMAIN:-localhost} - PEERTUBE_WEBSERVER_PORT=80 - PEERTUBE_WEBSERVER_HTTPS=false - PEERTUBE_DB_HOSTNAME=db - PEERTUBE_DB_USERNAME=postgres_user - PEERTUBE_REDIS_HOSTNAME=redis labels: traefik.enable: "true" traefik.frontend.rule: "Host: ${CHATONS_SERVICE:-peertube}.${CHATONS_DOMAIN:-localhost}, www.${CHATONS_SERVICE:-peertube}.${CHATONS_DOMAIN:-localhost}" networks: - web - default volumes: - ${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-peertube}/data:/data - ${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-peertube}/config:/config db: image: postgres:10-alpine restart: unless-stopped environment: - POSTGRES_USER=postgres_user - POSTGRES_DB=peertube env_file: - .env volumes: - ${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-peertube}/postgres:/var/lib/postgresql/data redis: image: redis:4-alpine restart: unless-stopped volumes: - ${CHATONS_ROOT_DIR:-/srv/chatons}/${CHATONS_SERVICE:-peertube}/redis:/data