-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
143 lines (122 loc) · 2.63 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
version: '3.3'
networks:
sanare:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.1.0.0/24
services:
#discovery service - consul
consul:
image: consul:latest
command: "agent -server -ui -node=server-1 -bootstrap-expect=1 -client=0.0.0.0"
ports:
- "8500:8500"
- "8600:8600/udp"
#Wordpress
db:
image: mysql:5.7
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
hostname: db
networks:
sanare:
ipv4_address: 10.1.0.99
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
hostname: wordpress
volumes:
- wordpress_fs:/var/www/html
networks:
sanare:
ipv4_address: 10.1.0.100
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
#Sanare
# sanare-manager:
# depends_on:
# - consul
# build: ./sanare-manager
# hostname: sanare-manager
# networks:
# - sanare
# ports:
# - "3000:3000"
sanare-db-agent:
depends_on:
- db
- consul
build: ./sanare-db-agent
hostname: sanare-db-agent
networks:
- sanare
ports:
- "3001:3001"
sanare-http-agent:
build: ./sanare-http-agent
hostname: sanare-http-agent
networks:
- sanare
ports:
- 8081:80
- 443:443
sanare-http-log:
build: ./sanare-http-log
hostname: sanare-http-log
networks:
sanare:
ipv4_address: 10.1.0.123
ports:
- "5432:5432"
# sanare-fs-agent:
# build: ./sanare-fs-agent
# hostname: sanare-fs-agent
# volumes:
# - wordpress_fs:/var/www/html
# networks:
# - sanare
# ports:
# - 3006
# nginx:
# image: nginx:latest
# container_name: production_nginx
# volumes:
# - ./sanare-http-agent-nginx/nginx.conf:/etc/nginx/nginx.conf
# - ./sanare-http-agent-nginx/access.log:/var/log/nginx/access.log
# networks:
# - sanare
# ports:
# - 8081:80
# - 443:443
sanare-log:
image: mongo:latest
# environment:
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: sanare
# DATABASE_USERNAME: sanare
# DATABASE_PASSWORD: sanare
ports:
- "27017:27017"
networks:
sanare:
ipv4_address: 10.1.0.101
volumes:
db_data: {}
wordpress_fs: