-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
46 lines (45 loc) · 1.01 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
version: '3'
services:
#============================================================ REDIS
redis:
hostname: redis
image: redis:latest
ports:
- 9736:6379
networks:
- tweet
#volumes:
#- ./db_data/redis_data:/data
#============================================================ MONGODB
db:
hostname: 'db'
image: postgres:latest
ports:
- 2345:5432
volumes:
#- ./db_data/pg_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_PORT=5432
- POSTGRES_USER=saeed
- POSTGRES_PASSWORD=123
networks:
- tweet
# #============================================================ API
api:
build: .
hostname: api
ports:
- 2080:2080
depends_on:
- db
- redis
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:2080"]
interval: 30s
timeout: 10s
retries: 5
networks:
- tweet
networks:
tweet: