forked from cayke1/VirtuaLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
107 lines (99 loc) · 2.24 KB
/
docker-compose.yml
File metadata and controls
107 lines (99 loc) · 2.24 KB
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
version: "3.9"
services:
# API Gateway
api-gateway:
build: .
container_name: virtualib_api_gateway
ports:
- "8080:80"
env_file:
- .env
volumes:
- .:/var/www/html
depends_on:
- auth-service
- books-service
- notifications-service
- dashboard-service
# Auth Service
auth-service:
build: .
container_name: virtualib_auth_service
ports:
- "8081:80"
env_file:
- .env
volumes:
- .:/var/www/html
environment:
- SERVICE_NAME=auth
- SERVICE_PORT=8081
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
# Books Service
books-service:
build: .
container_name: virtualib_books_service
ports:
- "8082:80"
env_file:
- .env
volumes:
- .:/var/www/html
environment:
- SERVICE_NAME=books
- SERVICE_PORT=8082
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
# Notifications Service
notifications-service:
build: .
container_name: virtualib_notifications_service
ports:
- "8083:80"
env_file:
- .env
volumes:
- .:/var/www/html
environment:
- SERVICE_NAME=notifications
- SERVICE_PORT=8083
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
# Dashboard Service
dashboard-service:
build: .
container_name: virtualib_dashboard_service
ports:
- "8084:80"
env_file:
- .env
volumes:
- .:/var/www/html
environment:
- SERVICE_NAME=dashboard
- SERVICE_PORT=8084
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
# Nginx Load Balancer (opcional)
nginx:
image: nginx:alpine
container_name: virtualib_nginx
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- api-gateway