forked from Radarr/RadarrAPI.Update
-
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.
* Docker Changes Initial changes - Refactor how the docker container is started - working on getting the startup / setup scripts working * Working on getting the docker to build and start correctly * Changes to the Docker files and scripts. It now brings both containers up. Runs the DB Migrations and sets everything up * Fixes to make Docker Work - Startup.cs : Added debug values for some Variables to make sure they are passing correctly - Dockerfile: refactored the build and added some directory removals (I've found they cause the build to error) - README.md : added info on docker usage - docker-compose : removed old entries * Refactor Refactored the docker-compose, as my in-experince with docker containers skewed how I did some things.. this shoule be more streamlined * Refactor for using ENV Variables This refactors the WebAPI Code so that it will use ENV variables if they are present * fixup! removes mysql port * Adds more debug info
- Loading branch information
1 parent
9ab1fad
commit 10680c1
Showing
5 changed files
with
53 additions
and
24 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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
FROM microsoft/dotnet:2.0-sdk | ||
WORKDIR /app | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY LidarrAPI/*.csproj ./ | ||
RUN dotnet restore | ||
|
||
# copy everything else and build | ||
COPY LidarrAPI/* ./ | ||
RUN dotnet publish -c Release -o out | ||
COPY docker-services/LidarrAPI/docker-entrypoint.sh ./ | ||
|
||
# Windows screws with Line Endings, so do this to be 100% sure | ||
RUN sed -i 's/\o015/\n/g' docker-entrypoint.sh | ||
|
||
# Run needed things on build | ||
RUN dotnet restore && dotnet publish -c Release -o out | ||
|
||
ENTRYPOINT ["dotnet", "out/LidarrAPI.dll"] | ||
# Docker Entry | ||
ENTRYPOINT ["./docker-entrypoint.sh"] |
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
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
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
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,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Entrypoint for the docker container | ||
|
||
# First, we need to make sure the database is there | ||
echo "[Entrypoint-LidarAPI] Running Database Migrations" | ||
dotnet ef database update | ||
|
||
#Second, start the Service | ||
echo "[Entrypoint-LidarAPI] Starting LidarrAPI Service" | ||
dotnet out/LidarrAPI.dll |