-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (79 loc) · 2.03 KB
/
docker-compose.yml
File metadata and controls
82 lines (79 loc) · 2.03 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
services:
user:
build:
context: .
image: ommrgazar315/user-service:2.0_grpc
restart: unless-stopped
working_dir: /var/www
volumes:
- .:/var/www
- ./vendor:/var/www/vendor
- grpc_cache:/tmp/pear
depends_on:
- user_db
networks:
- db-network
- webserver-network
- service-network
- broker-network
environment:
- DB_CONNECTION=mysql
- DB_HOST=user_db
- DB_PORT=3306
- DB_DATABASE=user_db
- DB_USERNAME=laravel
- DB_PASSWORD=user_pass
- AMQP_HOST=rabbitmq
- AMQP_PORT=5672
- AMQP_USER=guest
- AMQP_PASSWORD=guest
- AMQP_VHOST=/
- GRPC_SERVER_PORT=9501
- GRPC_SERVER_HOST=0.0.0.0
# command: >
# sh -c "php-fpm"
user_db:
image: mysql:8.0
container_name: user_db
restart: unless-stopped
ports:
- "8087:3306"
#expose:
# - "8002"
environment:
- MYSQL_DATABASE=user_db
- MYSQL_USER=laravel
- MYSQL_PASSWORD=user_pass
- MYSQL_ROOT_PASSWORD=root_pass
volumes:
- ../DBs/user-db:/var/lib/mysql
networks:
- db-network
user-webserver:
image: nginx:alpine
container_name: user-webserver
restart: unless-stopped
ports:
- "8002:80"
#expose:
# - "8002"
volumes:
- .:/var/www
- ../nginx/conf.d/user.conf:/etc/nginx/conf.d/default.conf
depends_on:
- user
networks:
- webserver-network
- service-network
networks:
db-network:
driver: bridge
webserver-network:
driver: bridge
service-network:
external: true
broker-network:
external: true
volumes:
user-db:
grpc_cache: