using env file for db password, using asp net for cli runtime

This commit is contained in:
andy 2022-02-13 19:23:20 +00:00
parent 090b12eebd
commit 1ca18a9174
4 changed files with 3 additions and 5 deletions

View File

@ -27,10 +27,6 @@ jobs:
build-Docker: build-Docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dotnet-version: [ '6.0.x' ]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@ -18,7 +18,7 @@ RUN dotnet test --no-restore --verbosity normal
FROM base as publish FROM base as publish
RUN dotnet publish Selector.CLI/Selector.CLI.csproj -c Release -o /app --no-restore RUN dotnet publish Selector.CLI/Selector.CLI.csproj -c Release -o /app --no-restore
FROM mcr.microsoft.com/dotnet/runtime:6.0 FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /app WORKDIR /app
COPY --from=publish /app ./ COPY --from=publish /app ./
ENV DOTNET_EnableDiagnostics=0 ENV DOTNET_EnableDiagnostics=0

View File

@ -34,3 +34,4 @@ services:
image: postgres image: postgres
ports: ports:
- "5432:5432" - "5432:5432"
env_file: .env # set POSTGRES_PASSWORD

View File

@ -30,3 +30,4 @@ services:
image: postgres image: postgres
ports: ports:
- "5432:5432" - "5432:5432"
env_file: .env # set POSTGRES_PASSWORD