forked from linkdotnet/Blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (43 loc) · 1.28 KB
/
docker-compose.yml
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
38
39
40
41
42
43
services:
dotnet:
image: linkdotnet.blog.web
build: ./
container_name: dotnetBlog
ports:
- 80:80
- 443:443
restart: always
volumes:
- ./src/LinkDotNet.Blog.Web/appsettings.json:/app/appsettings.json
- /root/.aspnet/DataProtection-Keys:/root/.aspnet/DataProtection-Keys
- ./Blog.db:/app/Blog.db # Sqlite datebase
- /root/aspnetapp.pfx:/app/aspnetapp.pfx # ssl certificate
environment:
- ASPNETCORE_URLS=http://+:80;https://+:443
- ASPNETCORE_HTTPS_PORT=443
- ASPNETCORE_Kestrel__Certificates__Default__Password= # Your certificate password
- ASPNETCORE_Kestrel__Certificates__Default__Path=/app/aspnetapp.pfx
- ASPNETCORE_ENVIRONMENT=Production
networks:
- web_net
######################################
depends_on:
- sql
sql: # if you use SqlServer
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: sql
expose:
- 1433
restart: always
volumes:
- sqlvolume:/var/opt/mssql
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD= #your sql password
networks:
- web_net
volumes: # creates a shared data volume named sqlvolume if you use sqlserver
sqlvolume:
###########################################
networks:
web_net: