-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (100 loc) · 2.76 KB
/
docker-compose.yml
File metadata and controls
105 lines (100 loc) · 2.76 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
services:
api-gw:
build:
context: .
image: ommrgazar315/api-gw:2.0
container_name: api-gw
restart: unless-stopped
working_dir: /var/www
volumes:
- .:/var/www
depends_on:
api-gw_db:
condition: service_healthy
rabbitmq:
condition: service_started
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000" ]
networks:
- db-network
- cache-network
- webserver-network
- broker-network
- service-network
environment:
- APP_NAME=Furnisique
- APP_ENV=local
- APP_DEBUG=true
- DB_CONNECTION=mysql
- DB_HOST=api-gw_db
- DB_PORT=3306
- DB_DATABASE=api-gw_db
- DB_USERNAME=laravel
- DB_PASSWORD=api-gw_pass
- BROADCAST_DRIVER=redis
- CACHE_DRIVER=redis
- QUEUE_CONNECTION=redis
- SESSION_DRIVER=redis
- REDIS_HOST=redis
api-gw_db:
image: mysql:8.0
container_name: api-gw_db
restart: unless-stopped
ports:
- "8089:3306"
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 10s
timeout: 5s
retries: 5
environment:
- MYSQL_DATABASE=api-gw_db
- MYSQL_USER=laravel
- MYSQL_PASSWORD=api-gw_pass
- MYSQL_ROOT_PASSWORD=root_pass
volumes:
- ../DBs/api-gw-db:/var/lib/mysql
networks:
- db-network
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
restart: unless-stopped
ports:
- "5672:5672" # AMQP port
- "15672:15672" # Management UI port
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
volumes:
- rabbitmq-data:/var/lib/rabbitmq
networks:
- broker-network
- service-network
api-gw-webserver:
image: nginx:alpine
container_name: api-gw-webserver
restart: unless-stopped
ports:
- "8001:80"
volumes:
- ../nginx/conf.d/api-gw.conf:/etc/nginx/conf.d/default.conf
depends_on:
- api-gw
networks:
- webserver-network
- service-network
networks:
db-network:
driver: bridge
cache-network:
driver: bridge
webserver-network:
driver: bridge
service-network:
external: true
broker-network:
external: true
volumes:
api-gw-db:
rabbitmq-data: