services:
  grocy:
    image: lscr.io/linuxserver/grocy:latest
    container_name: grocy
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    volumes:
      - type: volume
        source: grocy_config
        target: /config
        volume:
          nocopy: true
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik_proxy"
      - "traefik.http.routers.grocy.rule=Host(`grocy.storel.xyz`)"
      - "traefik.http.routers.grocy.entrypoints=https"
      - "traefik.http.routers.grocy.tls.certresolver=letsencrypt"
      - "traefik.http.routers.grocy.service=grocy"
      - "traefik.http.services.grocy.loadbalancer.server.port=80"
    networks:
      - traefik_proxy

volumes:
  grocy_config:
    driver: local
    driver_opts:
      type: nfs
      o: addr=192.168.2.132,rw,nfsvers=3,nolock
      device: ":/volume1/homes/grocy"

networks:
  traefik_proxy:
    external: true