001package io.ebean.docker.commands;
002
003import java.util.Properties;
004
005/**
006 * Sql Server configuration.
007 */
008public class SqlServerConfig extends DbConfig {
009
010  public SqlServerConfig(String version, Properties properties) {
011    this(version);
012    setProperties(properties);
013  }
014
015  public SqlServerConfig(String version) {
016    super("sqlserver", 1433, 1433, version);
017    this.image = "mcr.microsoft.com/mssql/server:" + version;
018    // default password that satisfies sql server
019    this.adminUsername = "sa";
020    this.adminPassword = "SqlS3rv#r";
021    this.password = "SqlS3rv#r";
022  }
023
024  public String jdbcUrl() {
025    return "jdbc:sqlserver://localhost:" + getPort() + ";databaseName=" + getDbName();
026  }
027
028  @Override
029  public String jdbcAdminUrl() {
030    return "jdbc:sqlserver://localhost:" + getPort();
031  }
032}