1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Rework container builder

This commit is contained in:
Maksym Pavlenko
2017-06-13 22:48:15 -07:00
parent ccaead6ee6
commit a0d1d7e54e
3 changed files with 10 additions and 30 deletions

View File

@@ -1,15 +0,0 @@
$> ./up.sh
$> docker-machine create --driver digitalocean \
--digitalocean-image ubuntu-16-04-x64 \
--digitalocean-access-token $DO_TOKEN \
--digitalocean-region ams2 \
--digitalocean-backups true \
--digitalocean-size 512mb \
podsync
$> docker-machine env podsync
$> $env:COMPOSE_CONVERT_WINDOWS_PATHS=0
$> docker-compose up -d

View File

@@ -1,8 +1,13 @@
FROM microsoft/aspnetcore:1.1.1
ARG PUBLISH_DIR="bin/Publish"
FROM microsoft/aspnetcore-build AS build
WORKDIR /workspace
COPY . .
RUN dotnet restore
RUN dotnet publish --configuration release --output ./bin/
FROM microsoft/aspnetcore:1.1
ENV ASPNETCORE_URLS http://*:8080
ENV ASPNETCORE_ENVIRONMENT Production
WORKDIR /app
COPY $PUBLISH_DIR .
COPY --from=build /workspace/bin/ .
EXPOSE 8080
ENTRYPOINT ["dotnet", "Podsync.dll"]

10
up.sh
View File

@@ -1,10 +0,0 @@
#!/bin/bash
OUTPUT_DIR=${1:-'bin/Publish'}
rm -rf src/Podsync/$OUTPUT_DIR
dotnet restore
dotnet publish --configuration release --output $OUTPUT_DIR
docker-compose up -d --build