-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (60 loc) · 1.36 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: '3.5'
services:
redis:
restart: always
image: 'redis:4-alpine'
command: redis-server --requirepass Qwertyu10P
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli","ping"]
interval: 30s
timeout: 10s
retries: 3
ports:
- '6379:6379'
networks:
- microservice-network
postgres:
restart: always
image: 'postgres:latest'
ports:
- '5432:5432'
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=Qwertyu10P
networks:
- microservice-network
microservice:
restart: always
build:
dockerfile: Dockerfile
context: ./
ports:
- '80:9000'
environment:
- MS_HTTP=9000
- MS_GRPC=9001
- MS_POSTGRES_HOST=postgres
- MS_POSTGRES_PORT=5432
- MS_POSTGRES_DBNAME=postgres
- MS_POSTGRES_USERNAME=postgres
- MS_POSTGRES_PASSWORD=Qwertyu10P
- MS_REDIS=redis:6379
- MS_REDISPASSWORD=Qwertyu10P
networks:
- microservice-network
volumes:
postgres-data:
redis-data:
networks:
microservice-network:
name: microservice