This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
108 lines (103 loc) · 2.81 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
version: "3.3"
services:
database:
image: mongo:latest
container_name: database
hostname: "${MONGODB_HOST}"
env_file: .env
expose:
- "${MONGODB_PORT}"
ports:
- "${MONGODB_PORT}:27017"
volumes:
- "dbdata:/data/db"
networks:
- node-network
restart: "${DOCKER_RESTART}"
api_gateway:
build: ./api_gateway
hostname: "api_gateway"
container_name: "api_gateway"
env_file: .env
ports:
- "${API_GATEWAY_PORT}:${API_GATEWAY_PORT}"
environment:
- PORT=${API_GATEWAY_PORT}
- SERVICE_USERS_HOST=${SERVICE_USERS_HOST}
- SERVICE_USERS_PORT=${SERVICE_USERS_PORT}
- SERVICE_VEHICLES_HOST=${SERVICE_VEHICLES_HOST}
- SERVICE_VEHICLES_PORT=${SERVICE_VEHICLES_PORT}
- SERVICE_RENTAL_HOST=${SERVICE_RENTAL_HOST}
- SERVICE_RENTAL_PORT=${SERVICE_RENTAL_PORT}
- HEADER_API_KEY=${HEADER_API_KEY}
networks:
- node-network
restart: "${DOCKER_RESTART}"
service_gender_age:
build: ./service_gender_age
hostname: "${SERVICE_GENDER_AGE_HOST}"
container_name: "service_gender_age"
ports:
- ${SERVICE_GENDER_AGE_PORT}:9000
networks:
- node-network
restart: "${DOCKER_RESTART}"
service_users:
build: ./service_users
hostname: "${SERVICE_USERS_HOST}"
container_name: "service_users"
env_file: .env
ports:
- "${SERVICE_USERS_PORT}:${SERVICE_USERS_PORT}"
environment:
- PORT=${SERVICE_USERS_PORT}
- MONGODB_URL=${MONGODB_URL}
- JWT_SECRET=${JWT_SECRET}
- JWT_ACCESS_EXPIRATION_SECONDS=${JWT_ACCESS_EXPIRATION_SECONDS}
- SERVICE_GENDER_AGE_HOST=${SERVICE_GENDER_AGE_HOST}
- SERVICE_GENDER_AGE_PORT=9000
- HEADER_API_KEY=${HEADER_API_KEY}
depends_on:
- database
volumes:
- "./service_users:/app"
networks:
- node-network
restart: "${DOCKER_RESTART}"
service_vehicles:
build: ./service_vehicles
hostname: "${SERVICE_VEHICLES_HOST}"
container_name: "service_vehicles"
env_file: .env
ports:
- "${SERVICE_VEHICLES_PORT}:${SERVICE_VEHICLES_PORT}"
environment:
- PORT=${SERVICE_VEHICLES_PORT}
- MONGODB_URL=${MONGODB_URL}
- HEADER_API_KEY=${HEADER_API_KEY}
depends_on:
- database
networks:
- node-network
restart: "${DOCKER_RESTART}"
service_rental:
build: ./service_rental
hostname: "${SERVICE_RENTAL_HOST}"
container_name: "service_rental"
env_file: .env
ports:
- "${SERVICE_RENTAL_PORT}:${SERVICE_RENTAL_PORT}"
environment:
- PORT=${SERVICE_RENTAL_PORT}
- MONGODB_URL=${MONGODB_URL}
- HEADER_API_KEY=${HEADER_API_KEY}
depends_on:
- database
networks:
- node-network
restart: "${DOCKER_RESTART}"
volumes:
dbdata: null
networks:
node-network:
driver: bridge