version: '3.0'

services:
  nginx-proxy:
    image: jwilder/nginx-proxy
    restart: always
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - certs:/etc/nginx/certs
      - vhost.d:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - /var/run/docker.sock:/tmp/docker.sock:ro
    labels:
      - com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy

  nginx-proxy-letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    restart: always
    volumes:
      - acme.sh:/etc/acme.sh
      - certs:/etc/nginx/certs
      - vhost.d:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - /var/run/docker.sock:/var/run/docker.sock:ro

  memcached:
    image: memcached
    restart: always
    expose:
      - "11211"

  yopass:
    image: jhaals/yopass
    restart: always
    environment:
      - VIRTUAL_HOST=subdomain.yourdomain.tld
      - LETSENCRYPT_HOST=subdomain.yourdomain.tld
      - LETSENCRYPT_EMAIL=mail@yourdomain.tld
    command: "--memcached=memcached:11211 --port 80"
    expose:
      - "80"

# yamllint disable rule:empty-values
volumes:
  certs:
  vhost.d:
  html:
  acme.sh:
# yamllint enable rule:empty-values
