-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (29 loc) · 794 Bytes
/
docker-compose.yml
File metadata and controls
31 lines (29 loc) · 794 Bytes
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
services:
web:
container_name: app
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ConnectionStrings__DefaultConnection=Host=db;Port=5432;Database=securenotes;Username=${DB_USERNAME};Password=${DB_PASSWORD}
volumes:
- ./DataProtection:/root/.aspnet/DataProtection # Persist data protection keys
depends_on:
- db
db:
image: postgres:14
container_name: db
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: securenotes
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
- ./Database/init.sql:/docker-entrypoint-initdb.d/init.sql
volumes:
db_data: