-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
44 lines (40 loc) · 1.02 KB
/
docker-compose.yaml
File metadata and controls
44 lines (40 loc) · 1.02 KB
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
version: '3.8'
services:
db:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
SA_PASSWORD: "${SA_PASSWORD}"
ACCEPT_EULA: "Y"
MSSQL_PID: "Express"
volumes:
- sql_data:/var/opt/mssql
# For production, keep the DB private (no ports). Temporarily expose if you must:
# ports:
# - "1433:1433"
restart: unless-stopped
api:
build:
context: .
dockerfile: Dockerfile
depends_on:
- db
environment:
ASPNETCORE_ENVIRONMENT: "Production"
ASPNETCORE_URLS: "http://0.0.0.0:8080"
ConnectionStrings__DefaultConnection: "Server=db,1433;Database=csvNetflixDB;User=sa;Password=${SA_PASSWORD};TrustServerCertificate=True;"
ports:
- "5000:8080"
volumes:
- "${SECRETS_DIR:-./secrets}:/app/secrets:ro"
restart: unless-stopped
frontend:
image: nginx:alpine
volumes:
- ./frontend:/usr/share/nginx/html:ro
ports:
- "8080:80"
depends_on:
- api
restart: unless-stopped
volumes:
sql_data: