-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (39 loc) · 922 Bytes
/
docker-compose.yml
File metadata and controls
43 lines (39 loc) · 922 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
32
33
34
35
36
37
38
39
40
41
42
43
version: '1.0'
services:
userservice:
build: ./src/UserService.Core
container_name: userservice
expose:
- 4000
ports:
- "4000"
depends_on:
postgres-db:
condition: service_started
environment:
- ConnectionStrings__DefaultConnection="Host=postgres-db;Database=postgres;Username=postgres;Password=postgres"
networks:
- user-service-local
postgres-db:
restart: always
image: postgres
container_name: postgres-container-test
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
retries: 5
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=postgres
- POSTGRES_DB=users
networks:
- user-service-local
networks:
user-service-local:
external: false
volumes:
db-data: