-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathdocker-compose.development.yml
More file actions
37 lines (36 loc) · 999 Bytes
/
Copy pathdocker-compose.development.yml
File metadata and controls
37 lines (36 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
services:
app:
container_name: app
build:
context: .
dockerfile: Dockerfile
target: dev
ports:
- "8080:80"
depends_on:
- database
environment:
- ASPNETCORE_ENVIRONMENT=Development # Set the environment to Development for hot reload
- DOTNET_USE_POLLING_FILE_WATCHER=1 # Enable file watching for hot reload
volumes:
- ./src:/src # Mount the source code directory to allow hot reload
command: ["dotnet", "watch", "run", "--no-launch-profile", "--urls", "http://+:5000;https://+:5001"]
database:
container_name: database
image: postgres
environment:
POSTGRES_DB: data
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "admin", "-d", "data"]
interval: 30s
retries: 5
timeout: 10s
volumes:
postgres_data:
driver: local