-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
37 lines (34 loc) · 903 Bytes
/
docker-compose.yml
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
version: '3.9'
services:
server:
container_name: englishwordslearning-server
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ConnectionStrings__DefaultConnection=Host=db;Port=5432;Username=postgres;Password=mysecretpassword;Database=postgres
db:
container_name: englishwordslearning-db
image: postgres:15-alpine
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_DB: postgres
restart: always
volumes:
- englishwordslearning-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 10s
retries: 5
volumes:
englishwordslearning-data: