-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dockercompose): initial dockercompose created
* feat(dockercompose): first structure of dockercompose added * fix(dockercompse): dotenv image added * fix(dockercompose): container port changed
- Loading branch information
1 parent
a37e39b
commit 0e022b1
Showing
2 changed files
with
40 additions
and
1 deletion.
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
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,39 @@ | ||
services: | ||
postgres: | ||
image: postgres:15 | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: 1234 | ||
POSTGRES_DB: mohaymen | ||
ports: | ||
- "5432:5432" | ||
volumes: | ||
- pgdata:/var/lib/postgresql/data | ||
|
||
migrate: | ||
image: mcr.microsoft.com/dotnet/sdk:8.0 | ||
depends_on: | ||
- postgres | ||
working_dir: /app | ||
volumes: | ||
- .:/app | ||
environment: | ||
ConnectionStrings__DefaultConnection: Host=postgres;Database=mohaymen;Username=postgres;Password=1234; | ||
command: > | ||
bash -c "dotnet tool install --global dotnet-ef && | ||
export PATH=\"$PATH:/root/.dotnet/tools\" && | ||
dotnet ef database update --project AnalysisData/AnalysisData/AnalysisData.csproj" | ||
web: | ||
image: yaghooli/dotnetdev:latest | ||
depends_on: | ||
migrate: | ||
condition: service_completed_successfully | ||
environment: | ||
ASPNETCORE_ENVIRONMENT: Development | ||
ConnectionStrings__DefaultConnection: Host=postgres;Database=mohaymen;Username=postgres;Password=1234; | ||
ports: | ||
- "8085:80" | ||
|
||
volumes: | ||
pgdata: |