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:
32
docker-compose.yml
Normal file
32
docker-compose.yml
Normal 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:
|
||||
Reference in New Issue
Block a user