-
Notifications
You must be signed in to change notification settings - Fork 4
/
blog-spider.yml
42 lines (40 loc) · 1.06 KB
/
blog-spider.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
# update user set host = "%" where user = "root";
# alter user 'root'@'%' identified with mysql_native_password by 'root'; FLUSH PRIVILEGES;
# vim docker-compose.yml
# docker network create --driver bridge --subnet 172.69.0.0/24 --gateway 172.69.0.1 blog
# docker-compose up
version: "3.9"
services:
mongo:
image: mongo
container_name: mongo
ports:
- "27017:27017"
volumes:
- ./mongo/data:/data/db
command: --auth --wiredTigerCacheSizeGB 1 # 配置内存限制
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root
networks:
default:
ipv4_address: 172.69.0.32
# mongo 管理界面
mongo-express:
image: mongo-express
container_name: mongo-express
depends_on:
- mongo
restart: unless-stopped
ports:
- "8081:8081"
environment:
- ME_CONFIG_MONGODB_ADMINUSERNAME=root
- ME_CONFIG_MONGODB_ADMINPASSWORD=root
- ME_CONFIG_MONGODB_SERVER=mongo
networks:
default:
ipv4_address: 172.69.0.33
networks:
default:
name: blog