name: dood-sshd
services:
  dood:
    network_mode: default
    ports:
      - 2222:2222
    environment:
      - PUID=2000
      - PGID=2000
      - SSHD_USERNAME=${SSHD_USERNAME:-docker}
      - SSHD_PASSWORD=${SSHD_PASSWORD:-passwd654321!}
    volumes:
      - home_ssh:/home/${SSHD_USERNAME:-docker}/.ssh
    configs:
      # - source: authorized_keys
      #   target: /home/${SSHD_USERNAME:-docker}/.ssh/authorized_keys
      - source: ssh.conf
        target: /etc/ssh/ssh_config.d/ssh.conf
      - source: sshd.conf
        target: /etc/ssh/sshd_config.d/sshd.conf
volumes:
  home_ssh:
configs:
  # authorized_keys:
  #   content: |

  ssh.conf:
    content: |

  sshd.conf:
    content: |
      PasswordAuthentication Yes
      ListenAddress 0.0.0.0
      Port 2222