-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.example.yaml
More file actions
62 lines (59 loc) · 1.74 KB
/
docker-compose.example.yaml
File metadata and controls
62 lines (59 loc) · 1.74 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
version: '3.8'
services:
app:
image: abdulwaisa/booklibraryapi:latest
container_name: booklibraryapi_app
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ConnectionStrings__LibraryDbConnection=Host=book-lib-postgres;Port=5432;Database=librarydb;Username=postgres;Password=postgres
- ConnectionStrings__Redis=book-lib-redis:6379
- Email__SmtpHost=mailpit
- Email__SmtpPort=1025
- Email__From=admin@example.com
- ASPNETCORE_URLS=https://+:9443;http://+:8080
- ASPNETCORE_Kestrel__Certificates__Default__Password=Password123!
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnet-dev-cert.pfx
ports:
- "8080:8080"
- "9443:9443"
depends_on:
- book-lib-postgres
- book-lib-redis
- mailpit
restart: unless-stopped
# If you need the dev certificate, mount it as a volume:
# volumes:
# - ./aspnet-dev-cert.pfx:/https/aspnet-dev-cert.pfx
book-lib-postgres:
image: postgres:15.1
container_name: BookLibrary.Postgres
environment:
POSTGRES_DB: librarydb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
book-lib-redis:
image: redis:7.0
container_name: BookLibrary.Redis
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
mailpit:
image: axllent/mailpit:latest
container_name: mailpit
ports:
- "8025:8025" # Web UI
- "3025:1025" # SMTP (host:container)
restart: unless-stopped