diff --git a/compose/windows.yml b/compose/windows.yml new file mode 100644 index 00000000..71a269f7 --- /dev/null +++ b/compose/windows.yml @@ -0,0 +1,26 @@ +services: + windows: + image: dockurr/windows + container_name: windows + environment: + TZ: ${TZ:-Asia/Shanghai} + VERSION: ${WINDOWS_VERSION:-2022} + DISK_SIZE: ${WINDOWS_DISK_SIZE:-64G} + LANGUAGE: ${WINDOWS_LANGUAGE:-Chinese} + USERNAME: ${WINDOWS_USERNAME:-administrator} + PASSWORD: $BOOTSTRAP_TOKEN + devices: + - /dev/kvm + cap_add: + - NET_ADMIN + ports: + - 8006:8006 + - 3389:3389/tcp + - 3389:3389/udp + # - 5985:5985 + # - 5986:5986 + # volumes: + # - ${VOLUME_DIR}/windows/data/windows.iso:/custom.iso + stop_grace_period: 2m + networks: + - net \ No newline at end of file diff --git a/scripts/utils.sh b/scripts/utils.sh index 64b92700..3fe9424f 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -279,6 +279,7 @@ function get_docker_compose_services() { redis_host=$(get_config REDIS_HOST) use_es=$(get_config USE_ES) use_minio=$(get_config USE_MINIO) + use_windows=$(get_config USE_WINDOWS) use_loki=$(get_config USE_LOKI) use_xpack=$(get_config_or_env USE_XPACK) @@ -309,6 +310,7 @@ function get_docker_compose_services() { [[ "${use_es}" == "1" ]] && services+=" es" [[ "${use_minio}" == "1" ]] && services+=" minio" + [[ "${use_windows}" == "1" ]] && services+=" windows" [[ "${use_loki}" == "1" ]] && services+=" loki" if [[ "${use_xpack}" == "1" ]]; then @@ -327,7 +329,6 @@ function get_docker_compose_cmd_line() { use_ipv6=$(get_config USE_IPV6) use_xpack=$(get_config_or_env USE_XPACK) https_port=$(get_config HTTPS_PORT) - db_images_file=$(get_db_images_file) cmd="docker compose" if [[ "${use_ipv6}" != "1" ]]; then cmd+=" -f compose/network.yml" @@ -343,27 +344,14 @@ function get_docker_compose_cmd_line() { done if [[ "${services}" =~ "mysql" || "${services}" =~ "postgresql" ]]; then + db_images_file=$(get_db_images_file) cmd+=" -f ${db_images_file}" fi - use_es=$(get_config USE_ES) - if [[ "${use_es}" == "1" ]]; then - cmd+=" -f compose/es.yml" - fi - - use_minio=$(get_config USE_MINIO) - if [[ "${use_minio}" == "1" ]]; then - cmd+=" -f compose/minio.yml" - fi - if [[ -n "${https_port}" ]]; then cmd+=" -f compose/lb.yml" fi - if [[ "${services}" =~ loki ]]; then - cmd+=" -f compose/loki.yml" - fi - if [[ "${use_xpack}" == '1' ]]; then for service in magnus razor xrdp video panda; do if [[ "${services}" =~ ${service} ]]; then