-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Gsonovb/dev
Merage Dev to master
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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."; |