class infisical {
  include docker

  contain infisical::install
}

class infisical::install {
  package { 'docker-compose':
    ensure => installed
  }

  file { '/opt/infisical':
    ensure => directory
  }

  file { '/opt/infisical/compose.yml':
    ensure => file,
    source => 'puppet:///modules/infisical/compose.yml'
  }
  file { '/opt/infisical/.env':
    ensure => file,
    source => 'puppet:///modules/infisical/.env'
  }

  docker_compose { 'infisical':
    compose_files => ['/opt/infisical/compose.yml'],
    ensure        => present,
  }
}
