0%

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
version: '2'
services:
admin:
image: node:10.16-alpine
container_name: admin
ports:
- '8081:8080'
working_dir: /www/wwwroot/admin
volumes: # 文件夹映射
- /www/wwwroot/admin:/www/wwwroot/admin # 挂载源码
- /etc/timezone:/etc/timezone #同步时区
- /etc/localtime:/etc/localtime #同步时区
command: /bin/sh -c "npm config set unsafe-perm true && npm config set registry http://registry.npm.taobao.org && npm install echarts -S && npm install webpack-dev-server -g && npm install webpack-dev-server -g && npm i && npm run dev"
networks:
- 'net'
privileged: true
restart: always

client:
image: node:10.16-alpine
container_name: client
ports:
- '8080:8080'
working_dir: /www/wwwroot/client
volumes: # 文件夹映射
- /www/wwwroot/client:/www/wwwroot/client # 挂载源码
- /etc/timezone:/etc/timezone #同步时区
- /etc/localtime:/etc/localtime #同步时区
command: /bin/sh -c "npm config set unsafe-perm true && npm config set registry http://registry.npm.taobao.org &&npm install webpack-dev-server -g && npm install webpack-dev-server -g && npm i --unsafe-perm && npm run dev"
networks:
- 'net'
privileged: true
restart: always

springboot:
image: openjdk:8-jdk-alpine
working_dir: /www/wwwroot/java
container_name: springboot
ports:
- '8088:8088'
volumes: # 容器数据卷挂载
- /www/wwwroot/java/fmall-0.0.1-SNAPSHOT.jar:/www/wwwroot/java/app.jar # 挂载源码
- /etc/timezone:/etc/timezone #同步时区
- /etc/localtime:/etc/localtime #同步时区
command: /bin/sh -c "nohup java -jar app.jar"
privileged: true
networks:
- 'net'
depends_on:
- redis
- mysql
restart: always

mysql:
image: mysql:5.7
container_name: mysql
ports:
- 3306:3306
volumes:
- ./mysql/data:/var/lib/mysql # 挂载数据目录
- ./mysql/conf:/etc/mysql/conf.d # 挂载配置文件目录
- ./mysql/logs:/var/log/mysql # 挂载配置文件目录
- ./mysql/init:/docker-entrypoint-initdb.d
privileged: 'true'
env_file:
- ./mysql/mysql.env
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
networks:
- net
restart: always

redis:
image: redis:alpine
container_name: redis
ports:
- 6379:6379
volumes:
- ./redis/data:/data
- ./redis/conf/redis.conf:/usr/local/etc/redis/redis.conf
- /etc/timezone:/etc/timezone #同步时区
- /etc/localtime:/etc/localtime #同步时区
command: redis-server /usr/local/etc/redis/redis.conf
networks:
- 'net'
restart: always

nginx:
image: nginx:alpine
container_name: nginx
ports:
- '80:80'
- '7000:7000'
- '443:443'
volumes: # 文件夹映射
- ./nginx/conf.d:/etc/nginx/conf.d # nginx站点配置文件
- /www/wwwroot:/etc/nginx/sites-available # 宿主:docker:只读 ,www目录
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf # nginx配置文件
- ./nginx/logs:/var/log/nginx # 网站日志文件
- /etc/timezone:/etc/timezone #同步时区
- /etc/localtime:/etc/localtime #同步时间
- /www/wwwroot:/www/wwwroot
networks:
- net
depends_on:
- springboot
- admin
- client
restart: always

elasticsearch:
image: elasticsearch:7.6.1
container_name: elasticsearch
environment:
- node.name=elasticsearch
- cluster.name=es-docker-cluster
# - discovery.seed_hosts=192.168.0.1
- cluster.initial_master_nodes=elasticsearch
- bootstrap.memory_lock=true
- 'ES_JAVA_OPTS=-Xms1g -Xmx1g'
privileged: true
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./elasticsearch/data:/usr/share/elasticsearch/data
- ./elasticsearch/logs:/usr/share/elasticsearch/logs
- ./elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- ./elasticsearch/elastic-certificates.p12:/usr/share/elasticsearch/config/elastic-certificates.p12
ports:
- 9200:9200
networks:
- net

networks:
net:
driver: bridge
阅读全文 »

C++基本数据类型占字节数

32位编译器

char :1个字节
char(即指针变量): 4个字节(32位的寻址空间是2^32, 即32个bit,也就是4个字节。同理64位编译器)
short int : 2个字节
int: 4个字节
unsigned int : 4个字节
float: 4个字节
double: 8个字节
*
long: 4个字节**
long long: 8个字节
unsigned long: 4个字节

阅读全文 »

1、启动容器

1
2
3
4
5
6
7
8
9
10
11
12
version: "3"
services:
acme.sh:
image: neilpang/acme.sh
container_name: acme.sh
restart: always
command: daemon
environment:
- Ali_Key=xxxxxxxx
- Ali_Secret=xxxxxxxxxx
volumes:
- /www/nginx/ssl:/acme.sh
阅读全文 »

1、基础镜像

环境要求

  • 环境要求:Mysql至少5.2Nginx/ApachePHP至少5.4
1
php:5.6.40-fpm-alpine3.8
阅读全文 »

1、css选择器

img

一、SSH配置

1、更改Root用户密码

初次使用先从管理员切换到root用户,并更改root用户密码

1
2
3
4
切换Root用户
sudo su root
为root用户设置密码
passwd root
阅读全文 »