Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ services:
container_name: nginxalbumviewer
image: nginxalbumviewer
build:
context: ./nginx
dockerfile: Dockerfile
context: ./
dockerfile: nginx/Dockerfile
# volumes:.
# - ./dist:/usr/share/nginx/html
ports:
Expand All @@ -28,8 +28,6 @@ services:
dockerfile: Dockerfile
# volumes:
# - ./src/AlbumViewerNetCore:/var/www/albumviewer
ports:
- "5000:5000"
networks:
- app-network

Expand Down
4 changes: 2 additions & 2 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM nginx:alpine
MAINTAINER Rick Strahl

# Copy custom nginx config
COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./wwwroot /usr/share/nginx/html
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY src/AlbumViewerNetCore/wwwroot /usr/share/nginx/html

EXPOSE 80 443

Expand Down
2 changes: 1 addition & 1 deletion nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ http {

upstream dotnet {
zone dotnet 64k;
server 127.0.0.1:5000;
server westwindalbumviewer:5000;
}
}
10 changes: 5 additions & 5 deletions src/AlbumViewerNetCore/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
FROM mcr.microsoft.com/dotnet/aspnet:latest

MAINTAINER Rick Strahl

ENV ASPNETCORE_URLS=http://*:80
ENV ASPNETCORE_URLS=http://*:5000
ENV ASPNETCORE_ENVIRONMENT=Production

# Allow 1433 for SQL Server Access
EXPOSE 1433
#EXPOSE 1433

WORKDIR /var/www/albumviewer

# copy publish folder contents to web root
COPY ./bin/Release/netcoreapp3.1/publish .
COPY ./bin/Release/net6.0/publish .

# Run out of Publish Folder
CMD ["/bin/sh", "-c", "dotnet 'AlbumViewerNetCore.dll'"]
CMD ["/bin/sh", "-c", "dotnet 'AlbumViewerNetCore.dll'"]