-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
101 lines (93 loc) · 1.8 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
version: "3"
networks:
razvan:
services:
php:
build:
context: ./
dockerfile: Dockerfile
container_name: php-razvan
restart: unless-stopped
working_dir: /var/www/html
volumes:
- ./:/var/www/html
ports:
- "9000:9000"
networks:
- razvan
central-db:
image: mysql:5.7
container_name: central_db
restart: unless-stopped
tty: true
environment:
MYSQL_DATABASE: central_db
MYSQL_ROOT_PASSWORD: central
MYSQL_PASSWORD: central
MYSQL_USER: central
SERVICE_TAGS: dev
SERVICE_NAME: mysql_central_db
# volumes:
# - central_db:/var/lib/mysql
ports:
- 3307:3306
networks:
- razvan
db1:
image: mysql:5.7
container_name: db1
restart: unless-stopped
tty: true
environment:
MYSQL_DATABASE: db1
MYSQL_ROOT_PASSWORD: db_1
MYSQL_PASSWORD: db_1
MYSQL_USER: db_1
SERVICE_TAGS: dev
SERVICE_NAME: mysql_db1
# volumes:
# - db1:/var/lib/mysql
ports:
- 3308:3306
expose:
- 3308
networks:
- razvan
db2:
image: mysql:5.7
container_name: db2
restart: unless-stopped
tty: true
environment:
MYSQL_DATABASE: db2
MYSQL_ROOT_PASSWORD: db_2
MYSQL_PASSWORD: db_2
MYSQL_USER: db_2
SERVICE_TAGS: dev
SERVICE_NAME: mysql_db2
# volumes:
# - db2:/var/lib/mysql
ports:
- 3309:3306
expose:
- 3309
networks:
- razvan
nginx:
image: nginx:stable-alpine
container_name: nginx
restart: unless-stopped
depends_on:
- php
- central-db
ports:
- 8000:80
volumes:
- ./:/var/www/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
networks:
- razvan
volumes:
central_db:
db1:
db2: