Skip to content

Commit

Permalink
Merge pull request #1 from Gsonovb/dev
Browse files Browse the repository at this point in the history
Merage Dev to master
  • Loading branch information
Gsonovb authored Jan 3, 2017
2 parents bf86df5 + 1c15bdb commit d744077
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM microsoft/aspnet
#ARG site_root=/Orchard

Add download.ps1 /download.ps1

RUN powershell.exe -ExecutionPolicy RemoteSigned -noninteractive -File /download.ps1

#ADD ${site_root} /inetpub/wwwroot
#RUN icacls c:\inetpub\wwwroot\App_data /T /grant IIS_IUSRS:M
#RUN icacls c:\inetpub\wwwroot\Media /T /grant IIS_IUSRS:M
#ADD setacl.ps1 /inetpub
#RUN powershell.exe -ExecutionPolicy RemoteSigned -noninteractive -File /inetpub/setacl.ps1

EXPOSE 80

#ENTRYPOINT ["C:\\ServiceMonitor.exe", "w3svc"]
41 changes: 41 additions & 0 deletions download.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#This is the script file for development.
#https://github.com/OrchardCMS/Orchard/releases/download/1.10/Orchard.Web.zip
$url = "https://github.com/OrchardCMS/Orchard/releases/download/1.10/Orchard.Web.zip" ;
$dname = "Web.zip"
$desdir = "C:\inetpub\wwwroot";
$movedir = "Orchard";


$filename = Join-Path $env:temp $dname ;
Write-Host "Download $url to $filename ."
$r = Invoke-WebRequest $url -OutFile $filename ;


$expdir = Join-Path -Path $env:temp -ChildPath ([System.IO.Path]::GetFileNameWithoutExtension($dname));
Write-Host "Expand Archive $filename to $expdir ."
Expand-Archive -Path $filename -DestinationPath $expdir -Force


$mdir = Join-Path $expdir $movedir;
Write-Host "Move Files $expdir to $desdir .";
robocopy "$mdir" "$desdir" /E



Write-Host "Granting authority ";
icacls.exe c:\inetpub\wwwroot\App_data /T /grant IIS_IUSRS:M
icacls.exe c:\inetpub\wwwroot\Media /T /grant IIS_IUSRS:M


Write-Host "Delete Temp Files $expdir .";
Remove-Item $expdir -Recurse -Force;
Write-Host "Delete Download File $filename .";
Remove-Item $filename -Force;

if($args[0] -ne "debug")
{
Write-Host "Delete script ";
remove-item $MyInvocation.MyCommand.Path -force
}

Write-Host "Done.";

0 comments on commit d744077

Please sign in to comment.