-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (55 loc) · 2.17 KB
/
docker-compose.yml
File metadata and controls
57 lines (55 loc) · 2.17 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
services:
db:
image: postgres:16
container_name: blazorblog-postgres
environment:
- POSTGRES_DB=${POSTGRES_DB:-blazorblog}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in your environment or .env file}
ports:
- "127.0.0.1:${POSTGRES_PORT:-15432}:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-blazorblog}"]
interval: 10s
timeout: 5s
retries: 30
start_period: 20s
web:
build:
context: .
dockerfile: Dockerfile
image: unrealbg/blazorblog:latest
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ConnectionStrings__DefaultConnection=Host=db;Port=5432;Database=${POSTGRES_DB:-blazorblog};Username=${POSTGRES_USER:-postgres};Password=${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in your environment or .env file}
- AdminUser__Name=${ADMIN_USER_NAME:-Admin}
- AdminUser__Email=${ADMIN_USER_EMAIL:-admin@bblog.com}
- AdminUser__Password=${ADMIN_USER_PASSWORD:?Set ADMIN_USER_PASSWORD in your environment or .env file}
- AdminUser__Role=Admin
- Database__ApplyMigrationsOnStartup=${APPLY_MIGRATIONS_ON_STARTUP:-true}
- Database__SeedOnStartup=${SEED_ON_STARTUP:-true}
- Security__UseHttpsRedirection=${USE_HTTPS_REDIRECTION:-false}
- DataProtection__KeysPath=/app/DataProtection-Keys
- Email__Host=${EMAIL_HOST:-}
- Email__Port=${EMAIL_PORT:-587}
- Email__EnableSsl=${EMAIL_ENABLE_SSL:-true}
- Email__UserName=${EMAIL_USERNAME:-}
- Email__Password=${EMAIL_PASSWORD:-}
- Email__SenderEmail=${EMAIL_SENDER_EMAIL:-}
- Email__SenderName=${EMAIL_SENDER_NAME:-Blazor Blog}
- Email__RequireConfiguredSender=${EMAIL_REQUIRE_CONFIGURED_SENDER:-false}
depends_on:
db:
condition: service_healthy
ports:
- "8080:8080"
volumes:
- data-protection-keys:/app/DataProtection-Keys
# Optional persistent log volume.
# - blazorblog-logs:/app/Logs
volumes:
postgres-data:
data-protection-keys:
# blazorblog-logs: