-
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.
- Loading branch information
1 parent
eac009b
commit f1dbe55
Showing
7 changed files
with
90 additions
and
11 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 |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
*.user | ||
*.userosscache | ||
*.sln.docstates | ||
https/* | ||
.idea | ||
data/* | ||
.vscode | ||
|
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,25 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS server-base | ||
WORKDIR /app | ||
EXPOSE 80 | ||
EXPOSE 443 | ||
RUN apt-get update | ||
RUN apt-get install -y curl | ||
RUN apt-get install -y libpng-dev libjpeg-dev curl libxi6 build-essential libgl1-mesa-glx | ||
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - | ||
RUN apt-get install -y nodejs | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build | ||
RUN apt-get update | ||
RUN apt-get install -y curl | ||
RUN apt-get install -y libpng-dev libjpeg-dev curl libxi6 build-essential libgl1-mesa-glx | ||
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - | ||
RUN apt-get install -y nodejs | ||
WORKDIR /source | ||
COPY Chrono.sln . | ||
COPY src/. ./src | ||
COPY tests/. ./tests | ||
RUN dotnet publish -c release -o /app/publish | ||
|
||
FROM server-base AS server | ||
COPY --from=build /app/publish . | ||
ENTRYPOINT ["dotnet", "Chrono.WebUI.dll"] |
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,23 @@ | ||
version: "3.4" | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- "127.0.0.1:443:443" | ||
#- "127.0.0.1:80:80" | ||
environment: | ||
- ASPNETCORE_ENVIRONMENT=Production | ||
- ASPNETCORE_URLS=https://+:443 | ||
#- ASPNETCORE_URLS=https://+:443;http://+:80 | ||
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx | ||
- ASPNETCORE_Kestrel__Certificates__Default__Password=defaultPassword | ||
- ConnectionStrings__DefaultConnection=Data Source=../data/chrono.db | ||
- IdentityProvider__Authority=https://<HOSTNAME>.auth0.com/ | ||
- IdentityProvider__ClientId=<CLIENT_ID> | ||
- IdentityProvider__ClientSecret=<CLIENT_SECRET> | ||
volumes: | ||
- ./data:/data | ||
- ./https:/https |
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 @@ | ||
# Ensures all required files are created. | ||
mkdir -p ./data | ||
mkdir -p ./https | ||
|
||
if [ ! -f ./data/chrono.db ]; then | ||
sqlite3 data/chrono.db "VACUUM;" | ||
echo "Created chrono.db." | ||
else | ||
echo "chrono.db already exists." | ||
fi | ||
|
||
if [ ! -f ./https/aspnetapp.pfx ]; then | ||
dotnet dev-certs https -ep ./https/aspnetapp.pfx -p defaultPassword | ||
else | ||
echo "Valid https certificate already exists." | ||
fi |
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