version: "3.9"

services:

  bitwarden:
    container_name: bitwarden
    image: bitwarden/server:2023.4.3
    depends_on:
      - bitwarden-mariadb
    ports:
      - 0.0.0.0:80:8080
    environment:
      BW_DB_PROVIDER: "mysql"
      BW_DB_SERVER: "bitwarden-mariadb"
      BW_DB_DATABASE: "bitwarden"
      BW_DB_USERNAME: "root"
      BW_DB_PASSWORD: "ad87sds25dhg"
      BW_INSTALLATION_ID: 00000000-0000-0000-0000-000000000000
      BW_INSTALLATION_KEY: xxxxxxxxxxxx
    volumes:
      - ./volumes/bitwarden/data/:/etc/bitwarden
      - ./volumes/bitwarden/logs/:/var/log/bitwardem

  bitwarden-mariadb:
    image: mariadb:10
    container_name: bitwarden-mariadb
    environment:
      MARIADB_DATABASE: "bitwarden"
      MARIADB_ROOT_PASSWORD: "ad87sds25dhg" 
    volumes:
      - ./volumes/mariadb:/var/lib/mysql
