version: '3.1'

services:

  rsconnect:
    image: rstudio/rstudio-connect:2021.12.1
    restart: always
    ports:
      - 3939:3939
    volumes:
      - $PWD/script/setup-rsconnect/users.txt:/etc/users.txt
      - $PWD/script/setup-rsconnect/rstudio-connect.gcfg:/etc/rstudio-connect/rstudio-connect.gcfg
    # by default, mysql rounds to 4 decimals, but tests require more precision
    privileged: true
    environment:
      RSTUDIO_CONNECT_HASTE: "enabled"
      RSC_LICENSE: ${RSC_LICENSE}
