-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #245 from C9Glax/cuttingedge
Prod didn't break, nice
- Loading branch information
Showing
12 changed files
with
75 additions
and
106 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 |
---|---|---|
|
@@ -22,4 +22,6 @@ | |
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
LICENSE | ||
README.md | ||
README.md | ||
Manga | ||
settings |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -19,4 +19,7 @@ riderModule.iml | |
/.idea | ||
cover.jpg | ||
cover.png | ||
/.vscode | ||
/.vscode | ||
/Manga | ||
/settings | ||
*.DotSettings.user |
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,29 +1,42 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG DOTNET=7.0 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:7.0 as build-env | ||
FROM mcr.microsoft.com/dotnet/runtime:$DOTNET AS base | ||
WORKDIR /publish | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true | ||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium | ||
RUN apt-get update \ | ||
&& apt-get install -y libx11-6 libx11-xcb1 libatk1.0-0 libgtk-3-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2 libxshmfence1 libnss3 chromium \ | ||
&& apt-get autopurge -y \ | ||
&& apt-get autoclean -y | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:$DOTNET AS build-env | ||
WORKDIR /src | ||
COPY CLI /src/CLI | ||
COPY Tranga /src/Tranga | ||
COPY Logging /src/Logging | ||
|
||
COPY Tranga.sln /src | ||
RUN dotnet restore /src/Tranga/Tranga.csproj | ||
RUN dotnet publish -c Release -o /publish | ||
COPY CLI/CLI.csproj /src/CLI/CLI.csproj | ||
COPY Logging/Logging.csproj /src/Logging/Logging.csproj | ||
COPY Tranga/Tranga.csproj /src/Tranga/Tranga.csproj | ||
RUN dotnet restore /src/Tranga.sln | ||
|
||
COPY . /src/ | ||
RUN dotnet publish -c Release -o /publish -maxcpucount:1 | ||
|
||
FROM glax/tranga-base:latest as runtime | ||
FROM base AS runtime | ||
EXPOSE 6531 | ||
ARG UNAME=tranga | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
RUN groupadd -g $GID -o $UNAME | ||
RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME | ||
RUN mkdir /usr/share/tranga-api | ||
RUN mkdir /Manga | ||
RUN chown 1000:1000 /usr/share/tranga-api | ||
RUN chown 1000:1000 /Manga | ||
RUN groupadd -g $GID -o $UNAME \ | ||
&& useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME \ | ||
&& mkdir /usr/share/tranga-api \ | ||
&& mkdir /Manga \ | ||
&& chown 1000:1000 /usr/share/tranga-api \ | ||
&& chown 1000:1000 /Manga | ||
USER $UNAME | ||
|
||
WORKDIR /publish | ||
COPY --from=build-env /publish . | ||
COPY --chown=1000:1000 --from=build-env /publish . | ||
USER 0 | ||
RUN chown 1000:1000 /publish | ||
ENTRYPOINT ["dotnet", "/publish/Tranga.dll", "-f", "-c", "-l", "/usr/share/tranga-api/logs"] | ||
ENTRYPOINT ["dotnet", "/publish/Tranga.dll"] | ||
CMD ["-f", "-c", "-l", "/usr/share/tranga-api/logs"] |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
version: '3' | ||
services: | ||
tranga-api: | ||
build: | ||
dockerfile: Dockerfile | ||
context: . | ||
container_name: tranga-api | ||
volumes: | ||
- ./Manga:/Manga | ||
- ./settings:/usr/share/tranga-api | ||
ports: | ||
- "6531:6531" | ||
restart: unless-stopped | ||
tranga-website: | ||
image: glax/tranga-website:latest | ||
container_name: tranga-website | ||
ports: | ||
- "9555:80" | ||
depends_on: | ||
- tranga-api | ||
restart: unless-stopped |