-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (93 loc) · 2.38 KB
/
docker-compose.yml
File metadata and controls
98 lines (93 loc) · 2.38 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: '3.9'
services:
postgres:
image: postgres:16-alpine
container_name: pulsedata_db
restart: unless-stopped
environment:
POSTGRES_DB: pulsedata
POSTGRES_USER: pulsedata_user
POSTGRES_PASSWORD: pulsedata_pass
POSTGRES_INITDB_ARGS: '--encoding=UTF8 --locale=en_US.UTF-8'
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
- ./sql/001_create_schema.sql:/docker-entrypoint-initdb.d/01_schema.sql
- ./sql/002_seed_data.sql:/docker-entrypoint-initdb.d/02_seed.sql
- ./sql/003_views.sql:/docker-entrypoint-initdb.d/03_views.sql
- ./sql/004_stored_procedures.sql:/docker-entrypoint-initdb.d/04_procedures.sql
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U pulsedata_user -d pulsedata']
interval: 10s
timeout: 5s
retries: 5
networks:
- pulsedata_network
logging:
driver: 'json-file'
options:
max-size: '10m'
max-file: '3'
pgadmin:
image: dpage/pgadmin4:latest
container_name: pulsedata_pgadmin
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: admin@pulsedata.local
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- '8080:80'
depends_on:
postgres:
condition: service_healthy
networks:
- pulsedata_network
logging:
driver: 'json-file'
options:
max-size: '10m'
max-file: '3'
api:
build:
context: .
dockerfile: Dockerfile
container_name: pulsedata_api
restart: unless-stopped
environment:
ASPNETCORE_ENVIRONMENT: Development
ConnectionStrings__DefaultConnection: 'Server=postgres;Database=pulsedata;User Id=pulsedata_user;Password=pulsedata_pass;Port=5432;'
ASPNETCORE_URLS: 'http://+:8000'
ports:
- '8000:8000'
depends_on:
postgres:
condition: service_healthy
networks:
- pulsedata_network
healthcheck:
test:
[
'CMD',
'wget',
'--quiet',
'--tries=1',
'--spider',
'http://localhost:8000/api/health/live',
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
logging:
driver: 'json-file'
options:
max-size: '10m'
max-file: '3'
profiles:
- with-api
networks:
pulsedata_network:
driver: bridge
volumes:
postgres_data: