Bitwarden_rs with mysql remote server

I am very new to this and i need help in using mysql backend for bitwarden_rs instead of sqlite

I have bitwarden_rs running on a docker with docker compose. ( i tested it with sqlite and it works just fine. i want to install afresh with mysql db)

I have a mariadb server running on another server (not docker).

How should my docker compose be done? this is what i have now with sqlite & it works.

# bitwarden
version: '3'

services:
 bitwarden:
  image: bitwardenrs/server:latest
  container_name: bitwarden
  restart: always
  volumes:
      - /opt/bitwarden/data:/data/
  ports:
    - 8088:80
    - 3012:3012
  environment:
    LOG_FILE: '/opt/bitwarden/bitwarden.log'
    LOG_LEVEL: 'debug'
    EXTENDED_LOGGING: 'true'
    WEB_VAULT_ENABLED: 'true'
    WEBSOCKET_ENABLED: 'true'
    WEBSOCKET_PORT: '3012'
    ADMIN_TOKEN: 'XXXXXXXXXXXXXXXXXX'
    SIGNUPS_ALLOWED: 'true'

Do i just add this line under environment variables to make it work?

PS: I’m able to connect to the mysql db from the docker VM via mysql

Have you looked here: