-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (48 loc) · 1.56 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
44
45
46
47
48
49
50
version: '3.4'
# Create a volume for the database container to ensure data persists after the container is stopped.
volumes:
sqlserver-2022:
services:
# Database Service
csla8mt.database:
container_name: sqlserver.2022
# Pull the latest SQL Server image.
image: mcr.microsoft.com/mssql/server:2022-latest
# Map port 1433 on the SQL Server container to port 1433 in the host.
ports:
- "1433:1433"
# Specify where the persisted data should be stored.
volumes:
- sqlserver-2022:/var/opt/mssql
restart: always
# Specify environment variables for SQL Server.
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: MWGfWg4lid2lL2I0
# API Service
csla8mt.webapi:
container_name: csla8mt.sqlserver
# Pull the latest Web API image.
image: csla8mt.sqlserver
build:
context: .
# Use the Docker file in that Directory.
dockerfile: Csla8ModelTemplates.WebApi/Dockerfile
# This service depends on the database service specifed above.
depends_on:
- csla8mt.database
# Map port 8888 in the API container to port 80 in the Api
ports:
- "8080:80"
- "8081:443"
restart: always
# Specify environment variables for the API service.
environment:
- DBHOST=database
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=https://+:443;http://+:80
- ASPNETCORE_HTTP_PORTS=8080
- ASPNETCORE_HTTPS_PORT=8081
#volumes:
# - ${APPDATA}/Microsoft/UserSecrets/:/root/.microsoft/usersecrets
# - ${APPDATA}/ASP.NET/Https:/root/.aspnet/https/