From effe5d0d1ba4e8ba2aa6a95ac48eddb66803b3f0 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sun, 5 May 2019 06:00:52 +0200 Subject: initial commit add dummy docker-compose add Dockerfile for core --- .gitignore | 1 + core/Dockerfile | 19 +++++++++++++++++++ docker-compose.yml | 25 +++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 .gitignore create mode 100644 core/Dockerfile create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ce2ab01 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +**Token diff --git a/core/Dockerfile b/core/Dockerfile new file mode 100644 index 0000000..935084f --- /dev/null +++ b/core/Dockerfile @@ -0,0 +1,19 @@ +FROM microsoft/dotnet:sdk AS build-env + MAINTAINER Dennis Kobert + # Install cgit + RUN git clone git://github.com/TrueDoctor/DiscoBot && cd DiscoBot && mkdir app && cp DSACore/*.csproj app/ + WORKDIR /DiscoBot/app + + RUN dotnet restore + + # Copy everything else and build + RUN cp -r ../DSACore/ ../app && dotnet publish -c Release -o out + + + # Build runtime image + FROM microsoft/dotnet:aspnetcore-runtime + WORKDIR /app/ + COPY Token ./ + COPY --from=build-env /DiscoBot/app/out . + RUN cp -r DSACore/Properties ./ + ENTRYPOINT ["dotnet", "DSACore.dll"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..fe056c6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,25 @@ +on: '3' + services: + nginx: + image: nginx:1.15-alpine + ports: + - "80:80" + - "443:443" + volumes: + - ./data/nginx:/etc/nginx/conf.d + - ./data/certbot/conf:/etc/letsencrypt + - ./data/certbot/www:/var/www/certbot + command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" + restart: always + certbot: + image: certbot/certbot + volumes: + - ./data/certbot/conf:/etc/letsencrypt + - ./data/certbot/www:/var/www/certbot + entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" + restart: always + + networks: + default: + external: + name: frontend -- cgit v1.2.3