Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a04c23c

Browse files
committed
Added docker-compose
1 parent 8651fe0 commit a04c23c

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ RUN dotnet restore \
1212

1313
EXPOSE 5000
1414

15-
ENTRYPOINT ["dotnet", "watch", "run"]
15+
CMD ["dotnet", "watch", "run"]

docker-compose.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '2'
2+
services:
3+
app:
4+
build: .
5+
command: ["bash", "-c", "./start.sh"]
6+
volumes:
7+
- .:/app
8+
ports:
9+
- "5000:5000"
10+

start.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
dotnet ef database update
4+
dotnet watch run
5+
6+

0 commit comments

Comments
 (0)