jimtse
网站页面
docker pull mysql:5.7
docker pull redis:latest
docker pull java:8
docker run -p 3307:3306 --name saasmes_mysql -v /etc/localtime:/etc/localtime -v /etc/timezone:/etc/timezone:ro -v /home/saas_mes/db/conf:/etc/mysql/conf.d -v /home/saas_mes/db/logs:/logs -v /home/saas_mes/db/data:/var/lib/mysql --restart=always -e MYSQL_ROOT_PASSWORD='&&' -d mysql:5.7
protected-mode no
appendonly yes
requirepass PP1q2w3e&&
docker run --name zx_mes_redis -v /etc/localtime:/etc/localtime -v /etc/timezone:/etc/timezone:ro -v /home/mes/zx_test/redis/data:/data -v /home/mes/zx_test/redis/conf/redis.conf:/etc/redis/redis.conf -d -p 10014:6379 --restart=always redis:latest redis-server /etc/redis/redis.conf
firewall-cmd --zone=public --add-port=10014/tcp --permanent
FROM ascdc/jdk8
MAINTAINER jimtse
WORKDIR /
VOLUME /tmp
# 添加时区环境变量,亚洲,上海
ENV TimeZone=Asia/Shanghai
# 使用软连接,并且将时区配置覆盖/etc/timezone
RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone
RUN mkdir -p /home/zx_mes/data
RUN mkdir -p /home/mesData
ADD wd_mes_server-1.0-SNAPSHOT.jar zx_mes.jar
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dsun.jnu.encoding=UTF-8","-Dspring.profiles.active=test","-jar","/zx_mes.jar"]
#!/bin/bash
docker build -t zx_mes:1.0.2 .
docker stop zx_mes
docker rm zx_mes
docker run -d --restart always --name zx_mes -p 20003:10009 -v /home/mesData:/home/mesData -v /home/zx_mes/data:/home/zx_mes/data -v /home/Face_Recognition/arcsoft_lib/test:/home/Face_Recognition/arcsoft_lib/test zx_mes:1.0.2
docker rmi $(docker images | grep "none" | awk '{print $3}')
firewall-cmd --zone=public --add-port=20003/tcp --permanent
./startMes.sh
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
#root /home/nginx/html;
#try_files $uri $uri/ /index.html;
location / {
root /home/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
}
include /etc/nginx/conf.d/*.conf;
}
docker run -d -p 18401:80 --name zx_mes_pad --restart=always -v /etc/localtime:/etc/localtime -v /home/mes/zx_test/pad/nginx/html:/home/nginx/html -v /home/mes/zx_test/pad/nginx/conf/nginx.conf:/etc/nginx/nginx.conf -v /home/mes/zx_test/pad/nginx/conf.d:/etc/nginx/conf.d -v /home/mes/zx_test/pad/nginx/logs:/var/log/nginx nginx:1.15
docker run -d -p 18501:80 --name zx_mes_pc --restart=always -v /etc/localtime:/etc/localtime -v /home/mes/zx_test/pc/nginx/html:/home/nginx/html -v /home/mes/zx_test/pc/nginx/conf/nginx.conf:/etc/nginx/nginx.conf -v /home/mes/zx_test/pc/nginx/conf.d:/etc/nginx/conf.d -v /home/mes/zx_test/pc/nginx/logs:/var/log/nginx nginx:1.15
Jim Tse
https://jimtse.eu.org:88/backend/docker-springboot-vuejs-redis.html(转载时请注明本文出处及文章链接)