-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdocker-compose.yml
54 lines (49 loc) · 1.02 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
version: '3.7'
services:
app:
image: ngntu10/optimart-api:latest
container_name: spring-app
ports:
- "8085:8080"
environment:
DB_URL: jdbc:postgresql://db:5432/optimart
DB_USERNAME: ngntu10
DB_PASSWORD: nguyentu1005
REDIS_HOST: redis-optimart
REDIS_PORT: 6379
TZ: Asia/Ho_Chi_Minh
depends_on:
- db
- redis
networks:
- optimart-network
db:
image: postgres:13
container_name: postgres-db
environment:
POSTGRES_DB: optimart
POSTGRES_USER: ngntu10
POSTGRES_PASSWORD: nguyentu1005
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- optimart-network
redis:
image: redis:latest
container_name: redis-optimart
restart: always
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- optimart-network
volumes:
postgres-data: {}
redis-data: {}
networks:
optimart-network:
driver: bridge
name: optimart-network