Skip to content

Instantly share code, notes, and snippets.

@BenHall
Created January 19, 2017 15:03
Show Gist options
  • Save BenHall/22530953171604ef18649b027ad84b40 to your computer and use it in GitHub Desktop.
Save BenHall/22530953171604ef18649b027ad84b40 to your computer and use it in GitHub Desktop.
Deploy NerdDinner.com 2.0 as Windows Containers
<connectionStrings>
<add name="ApplicationServices" connectionString="Data Source=nerddinnerdb,1433;User Id=sa;Password=p@sSw0rd1sl0ngY0;" providerName="System.Data.SqlClient"/>
<add name="NerdDinnerEntities" connectionString="metadata=res://*/Models.NerdDinner.csdl|res://*/Models.NerdDinner.ssdl|res://*/Models.NerdDinner.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=nerddinnerdb,1433;User Id=sa;Password=p@sSw0rd1sl0ngY0;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
<add name="ELMAH.SQLite" connectionString="Data Source=|DataDirectory|errors.s3db"/>
</connectionStrings>
version: '2.1'
networks:
default:
external:
name: nat
services:
nerddinnerdb:
image: microsoft/mssql-server-windows-express:2016-sp1-windowsservercore-10.0.14393.447
ports:
- "1433:1433"
environment:
sa_password: "p@sSw0rd1sl0ngY0"
ACCEPT_EULA: "Y"
nerddinnerweb:
build: .
ports:
- "80:80"
depends_on:
- nerddinnerdb
FROM microsoft/iis:windowsservercore-10.0.14393.693
SHELL ["powershell", "-command"]
RUN Install-WindowsFeature NET-Framework-45-ASPNET; Install-WindowsFeature Web-Asp-Net45
RUN Remove-Website -Name 'Default Web Site'; \
mkdir c:\NerdDinner; \
New-Website -Name 'nerd-dinner' \
-Port 80 -PhysicalPath 'c:\NerdDinner' \
-ApplicationPool '.NET v4.5'
EXPOSE 80
COPY NerdDinner c:\NerdDinner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment