services: stunnel: restart: on-failure:3 build: context: . image: stunnel network_mode: "host" volumes: - ../ssl/ca.crt:/ca.crt:ro - ../ssl/server.crt:/server.crt:ro - ../ssl/server.key:/server.key:ro - ./stunnel.conf:/etc/stunnel/stunnel.conf:ro ulimits: nofile: soft: "102400" hard: "102400" logging: driver: "json-file" options: max-size: "64k"