-
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.
Browse files
Browse the repository at this point in the history
seed data into database
- Loading branch information
Showing
19 changed files
with
1,032 additions
and
42 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base | ||
WORKDIR /app | ||
EXPOSE 80 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build | ||
WORKDIR /src | ||
COPY ["skit.API/skit.API.csproj", "skit.API/"] | ||
COPY ["skit.Application/skit.Application.csproj", "skit.Application/"] | ||
COPY ["skit.Core/skit.Core.csproj", "skit.Core/"] | ||
COPY ["skit.Shared.Abstractions/skit.Shared.Abstractions.csproj", "skit.Shared.Abstractions/"] | ||
COPY ["skit.Shared/skit.Shared.csproj", "skit.Shared/"] | ||
COPY ["skit.Infrastructure/skit.Infrastructure.csproj", "skit.Infrastructure/"] | ||
RUN dotnet restore "skit.API/skit.API.csproj" | ||
COPY . . | ||
WORKDIR "/src/skit.API" | ||
RUN dotnet build "skit.API.csproj" -c Release -o /app/build | ||
|
||
FROM build AS publish | ||
RUN dotnet publish "skit.API.csproj" -c Release -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "skit.API.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: '3.9' | ||
|
||
services: | ||
api: | ||
image: skit | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
depends_on: | ||
- createBucket | ||
ports: | ||
- '5000:80' | ||
|
||
db: | ||
image: postgres | ||
ports: | ||
- '6000:5432' | ||
environment: | ||
POSTGRES_DB: skit-database | ||
POSTGRES_USER: skit-user | ||
POSTGRES_PASSWORD: 1qazXSW@ | ||
volumes: | ||
- postgres-data:/var/lib/postgresql/data | ||
depends_on: | ||
- minio | ||
|
||
minio: | ||
image: minio/minio:latest | ||
ports: | ||
- '9000:9000' | ||
- '9001:9001' | ||
volumes: | ||
- minio_data:/data | ||
environment: | ||
- MINIO_ROOT_USER=admin | ||
- MINIO_ROOT_PASSWORD=1qazXSW@ | ||
command: server --console-address ":9001" --address ":9000" /data | ||
|
||
createBucket: | ||
image: minio/mc | ||
depends_on: | ||
- db | ||
entrypoint: > | ||
/bin/sh -c " | ||
/usr/bin/mc alias set myminio http://minio:9000 admin 1qazXSW@; | ||
/usr/bin/mc mb myminio/skit; | ||
exit 0;" | ||
volumes: | ||
minio_data: | ||
driver: local | ||
postgres-data: |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,7 @@ | ||
[ | ||
{ | ||
"Name": "C#", | ||
"ThumUrl": "qwer", | ||
"PhotoPath": "csharp-photo.png" | ||
} | ||
] |
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
Oops, something went wrong.