Feat: dockerize the project with Dockerfile and docker-compose

- Added Dockerfile for containerizing the app.
- Created docker-compose.yml for managing services.
- Updated connection strings for Docker compatibility.
This commit is contained in:
2025-03-13 08:50:35 -07:00
parent b9036d8b7a
commit 61f06e474f
160 changed files with 7001 additions and 81 deletions

32
docker-compose.yml Normal file
View File

@@ -0,0 +1,32 @@
version: '3.4'
services:
db:
image: postgres:latest
environment:
POSTGRES_DB: SurveyBeta
POSTGRES_USER: postgres
POSTGRES_PASSWORD: MAJEDali645
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
survey-beta:
image: surveybeta
build:
context: .
dockerfile: survey-beta/Dockerfile
depends_on:
- db
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ConnectionStrings__DefaultConnection=Host=db;Database=SurveyBeta;Username=postgres;Password=MAJEDali645
ports:
- "8080:80"
volumes:
- .:/app
entrypoint: ["dotnet", "survey-beta.dll"]
volumes:
db_data: