Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows PowerShell Quick Start #192

Open
jvanalst opened this issue Nov 17, 2021 · 2 comments
Open

Windows PowerShell Quick Start #192

jvanalst opened this issue Nov 17, 2021 · 2 comments

Comments

@jvanalst
Copy link

jvanalst commented Nov 17, 2021

Any chance of an update to the Quick Start instructions for Windows PowerShell (which uses different environment variable syntax)?

e.g.

Set up path to Moodle code

$Env:MOODLE_DOCKER_WWWROOT="/path/to/moodle/code"

Choose a db server (Currently supported: pgsql, mariadb, mysql, mssql, oracle)

$Env:MOODLE_DOCKER_DB="pgsql"

Ensure customized config.php for the Docker containers is in place

cp config.docker-template.php $Env:MOODLE_DOCKER_WWWROOT/config.php

Start up containers

bin/moodle-docker-compose up -d

Wait for DB to come up (important for oracle/mssql)

this bash script doesn't work in Windows (unlike moodle-docker-compose-up that has a .cmd equivalent)
bin/moodle-docker-wait-for-db

Work with the containers (see below)

[..]

Shut down and destroy containers

bin/moodle-docker-compose down

@stronk7
Copy link
Member

stronk7 commented Nov 20, 2021

Hi @jvanalst,

this is, indeed, a good idea!

Main problem is that basically all us (maintainers @ HQ) do use unix/shell environments (linux, mac...) and don't have any Windows machine at hand (neither, surely, and more important, expertise enough with CMD/PS). In fact, right now, I think that the cmd alternative is not 100% equivalent to the shell one (the basis should work ok, but some of the details, customizations, surely are missing with CMD).

But any pull request, helping with the implementation or the docs/readme is welcome!

Also, we have some PRs, like #117 (about to add a PS version), or #131 (about adding docker own health-checks to replace the current "wait-for-xxx" scripts...

So, yes, I think that with a little of help we can improve current support for CMD/PS.

Ciao :-)

@terrycampbell
Copy link

Just a thought for the future, one advantage Powershell could bring is that it will run on Windows, Mac and Linux just fine, allowing us to have only a single codebase to maintain. Just requires installation of Powershell Core. Note. it also works fine within the containers if desired (e.g., for wait functions). I consider the Powershell learning curve to be relatively shallow and the resulting code can be quite readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants