mirror of https://github.com/abpframework/abp
parent
ac05e0cc3a
commit
45a1bb721d
@ -1,14 +1,30 @@
|
||||
$buildFolder = (Get-Item -Path ".\" -Verbose).FullName
|
||||
$outputFolder = Join-Path $buildFolder "outputs"
|
||||
# COMMON PATHS
|
||||
|
||||
$buildFolder = (Get-Item -Path ".\" -Verbose).FullName
|
||||
$slnFolder = Join-Path $buildFolder "..\"
|
||||
$outputFolder = Join-Path $buildFolder "outputs"
|
||||
$abpDeskFolder = Join-Path $slnFolder "src/AbpDesk"
|
||||
$abpDeskWebFolder = Join-Path $abpDeskFolder "AbpDesk.Web.Mvc"
|
||||
|
||||
# BUILD
|
||||
|
||||
Set-Location $slnFolder
|
||||
dotnet restore
|
||||
|
||||
# PUBLISH
|
||||
|
||||
Set-Location $abpDeskWebFolder
|
||||
dotnet publish --output (Join-Path $outputFolder "AbpDesk/Web")
|
||||
|
||||
Set-Location $buildFolder
|
||||
# CREATE DOCKER IMAGES
|
||||
|
||||
Set-Location (Join-Path $outputFolder "AbpDesk/Web")
|
||||
|
||||
docker rmi abpdesk/web -f
|
||||
docker build -t abpdesk/web .
|
||||
|
||||
Copy-Item (Join-Path $slnFolder "/docker/*.*") $outputFolder
|
||||
|
||||
# FINALIZE
|
||||
|
||||
Set-Location $outputFolder
|
||||
@ -0,0 +1,21 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
abpdesk_web_1:
|
||||
image: abpdesk/web
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Staging
|
||||
ports:
|
||||
- "9001:80"
|
||||
abpdesk_web_2:
|
||||
image: abpdesk/web
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Staging
|
||||
ports:
|
||||
- "9002:80"
|
||||
load_balancer:
|
||||
image: haproxy:1.7.1
|
||||
volumes:
|
||||
- "./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg"
|
||||
ports:
|
||||
- "9005:9005"
|
||||
@ -0,0 +1,18 @@
|
||||
global
|
||||
maxconn 4096
|
||||
|
||||
defaults
|
||||
mode http
|
||||
timeout connect 5s
|
||||
timeout client 50s
|
||||
timeout server 50s
|
||||
|
||||
listen http-in
|
||||
bind *:9005
|
||||
|
||||
server web-1 outputs_abpdesk_web_1_1:80
|
||||
server web-2 outputs_abpdesk_web_2_1:80
|
||||
|
||||
stats enable
|
||||
stats uri /haproxy
|
||||
stats refresh 1s
|
||||
@ -0,0 +1,7 @@
|
||||
FROM microsoft/aspnetcore
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
ENTRYPOINT ["dotnet", "AbpDesk.Web.Mvc.dll"]
|
||||
Loading…
Reference in new issue