-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (44 loc) · 1.04 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
version: '3.9'
networks:
foodorders-network:
driver: bridge
services:
foodorders-db:
image: postgres:14
environment:
POSTGRES_DB: foodorders
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 15432:5432
networks:
- foodorders-network
foodorders-api:
image: foodorders-api
command: ["/wait-for-it.sh", "foodorders-db:5432", "-t", "20", "--", "java", "-jar", "api.jar"]
environment:
DB_HOST: foodorders-db
SPRING_SESSION_STORE_TYPE: redis
SPRING_REDIS_HOST: foodorders-redis
SPRING_PROFILES_ACTIVE: development
#ports:
# - "8080:8080"
networks:
- foodorders-network
depends_on:
- foodorders-db
#deploy: // it's necessary remove ports property
#replicas: 2
foodorders-proxy:
build: ./nginx
image: foodorders-proxy
ports:
- "80:80"
networks:
- foodorders-network
depends_on:
- foodorders-api
foodorders-redis:
image: redis:6.2.1-alpine
networks:
- foodorders-network