Pilothouse
Pilothouse copied to clipboard
Windows Support
Need to test Pilothouse on Windows systems and resolve any incompatibilities, after converting PH to NodeJS (#68).
Hey @philipnewcomer! Tyler sent me your way after he gave the 10up FEE team a rundown on docker. I'm one of the few weirdos trying to use Windows / WSL as my development environment. I'd love to help with this ticket and tackle any troubleshooting that might be required (assuming you're looking for help that is).
Let me know!
Hi @magnificode, thanks for the offer! I am looking for help on this. I'd welcome your help in testing Windows support (when it's ready), or if you feel up to it, working on the following issues which will need to be resolved for Windows support.
I think most of the functionality should work on Windows out-of-the-box with little changes required thanks to the fact that it's written in Node, with the following exceptions:
- Paths: I don't know how Node handles forward/back slashes on Windows, but the codebase may need to updated to use
path.join
or some other such method of making filesystem paths cross-platform. - Admin privileges: We need admin access during the
up
anddown
commands in order to modify the hosts file. On macOS/Linux we use sudo, but I'm sure there's an equivalent on Windows, I just don't know yet what it is. - SSL certificate trust: Currently the generated SSL certificate (generated by a Node package, so that part is cross-platform already) is automatically added to the macOS keychain, which will make the local site certificates valid for any browser that uses macOS's certificate store. I'm sure Windows also has a global SSL certificate store, but I don't know if there's a way to programmatically add a certificate to that.
Those are the big issues that I think we'll need to deal with for Windows support in Pilothouse, although there may be others that I'm not aware of at this time. Feel free to start investigating possible solutions to any of these if you'd like.
Hi @philipnewcomer I've been playing with the code and got pilothouse working with Windows by changing two files:
environment.js : where I added the following condition:
function getAppHomeDirectory() {
var platform = process.platform,
pilothouse = '/.pilothouse';
if ( platform === 'win32' ) {
pilothouse = '\\.pilothouse';
}
return getHomeDirectory() + pilothouse;
}
and docker-compose.yml on templates/run by switching all "
to '
Hope it helps! :)
Edit: tried creating a site and had issues with Sites
path. If you want I can try working in this and creat a PR. Let me know.
@liciniofs if you'd like to create a PR, that'd be great. However, Windows support will require more than just fixing paths. I've detailed in my previous comment on this ticket what needs to be done to support Windows, the biggest blocker being the SSL certificate stores. Obviously macOS keychain doesn't exist on Windows so we'll need to add the Pilothouse SSL certificate to the Windows store when on that platform (and also to any browsers that use their own certificate store).