feat: enhance build and setup
This commit is contained in:
@@ -3,9 +3,22 @@ MYSQL_DATABASE=wfc_system_db
|
||||
WFC_CONFIG_DATABASE=wfc_config_db
|
||||
WFC_SYSTEM_DATABASE=wfc_system_db
|
||||
WFC_USER_DATABASE=wfc_user_db
|
||||
MYSQL_PORT=3306
|
||||
MYSQL_USER=mysql
|
||||
MYSQL_PASSWORD=
|
||||
NACOS_SERVER_ADDR=192.168.13.128:8848
|
||||
MYSQL_PASSWORD=123456
|
||||
REDIS_PORT=6379
|
||||
NACOS_NAME_SPACE=wfc-prod
|
||||
GATEWAY_ADDR=192.168.13.128:8080
|
||||
RESTART_OPTION=on-failure:3
|
||||
WFC_SERVER_PORT=80
|
||||
NACOS_SERVER_PORT=8848
|
||||
GATEWAY_SERVER_PORT=8080
|
||||
AUTH_SERVER_PORT=8081
|
||||
WFC_JOB_PORT=9203
|
||||
WFC_PAYMENT_PORT=9204
|
||||
WFC_SYSTEM_PORT=9205
|
||||
WFC_USER_PORT=9206
|
||||
WFC_SERVER_IP=192.168.2.116
|
||||
NACOS_SERVER_IP=${WFC_SERVER_IP}
|
||||
GATEWAY_SERVER_IP=${WFC_SERVER_IP}
|
||||
AUTH_SERVER_IP=${WFC_SERVER_IP}
|
||||
RESTART_OPTION=on-failure:5
|
||||
|
||||
|
||||
@@ -1,219 +1,297 @@
|
||||
services:
|
||||
wfc-nacos:
|
||||
container_name: wfc-nacos
|
||||
image: nacos/nacos-server
|
||||
container_name: wfc-nacos
|
||||
build:
|
||||
context: ./nacos
|
||||
environment:
|
||||
- MODE=standalone
|
||||
- NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR}
|
||||
- NACOS_NAME_SPACE=${NACOS_NAME_SPACE}
|
||||
- NACOS_NAME_SPACE=${NACOS_NAME_SPACE}
|
||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
||||
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
|
||||
volumes:
|
||||
- ./nacos/logs/:/home/nacos/logs
|
||||
- ./nacos/conf/application.properties:/home/nacos/conf/application.properties
|
||||
ports:
|
||||
- "8848:8848"
|
||||
- "9848:9848"
|
||||
- "9849:9849"
|
||||
- "${NACOS_SERVER_PORT}:${NACOS_SERVER_PORT}"
|
||||
networks:
|
||||
- wfc-fe-network
|
||||
- wfc-be-network
|
||||
depends_on:
|
||||
- wfc-mysql
|
||||
restart: ${RESTART_OPTION}
|
||||
wfc-mysql:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://${NACOS_SERVER_IP}:${NACOS_SERVER_PORT}/nacos/v1/console/health/liveness || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
wfc-mysql:
|
||||
container_name: wfc-mysql
|
||||
image: mysql:5.7
|
||||
container_name: wfc-mysql
|
||||
build:
|
||||
context: ./mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
- "${MYSQL_PORT}:${MYSQL_PORT}"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
- wfc-fe-network
|
||||
volumes:
|
||||
- ./mysql/db:/docker-entrypoint-initdb.d
|
||||
- ./mysql/conf.d:/etc/mysql/conf.d
|
||||
- ./mysql/logs:/logs
|
||||
- ./mysql/logs:/opt/wfc/mysql/logs
|
||||
- ./mysql/data:/var/lib/mysql
|
||||
- ./mysql/tmp:/tmp
|
||||
# command: [
|
||||
# 'mysqld',
|
||||
# '--defaults-extra-file=/etc/mysql/conf.d/my.cnf',
|
||||
# '--innodb-buffer-pool-size=80M',
|
||||
# '--character-set-server=utf8mb4',
|
||||
# '--collation-server=utf8mb4_unicode_ci',
|
||||
# '--default-time-zone=+8:00',
|
||||
# '--lower-case-table-names=1'
|
||||
# ]
|
||||
environment:
|
||||
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
||||
restart: ${RESTART_OPTION}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "mysqladmin ping -u root -p${MYSQL_ROOT_PASSWORD}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
wfc-redis:
|
||||
image: redis
|
||||
container_name: wfc-redis
|
||||
image: redis
|
||||
build:
|
||||
context: ./redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
- "${REDIS_PORT}:${REDIS_PORT}"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./redis/conf/redis.conf:/home/wfc/redis/redis.conf
|
||||
- ./redis/data:/data
|
||||
command: redis-server /home/wfc/redis/redis.conf
|
||||
restart: ${RESTART_OPTION}
|
||||
- ./redis/conf/redis.conf:/opt/wfc/redis/redis.conf
|
||||
- ./redis/data:/opt/wfc/redis/data
|
||||
command: redis-server /opt/wfc/redis/redis.conf
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
wfc-gateway:
|
||||
image: wfc-java:jre8
|
||||
container_name: wfc-gateway
|
||||
build:
|
||||
context: ./wfc/gateway
|
||||
dockerfile: dockerfile
|
||||
# build:
|
||||
# context: ./wfc/gateway
|
||||
# dockerfile: dockerfile
|
||||
ports:
|
||||
- "8080:8080"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
- wfc-fe-network
|
||||
volumes:
|
||||
- ./wfc/gateway/jar/wfc-gateway.jar:/home/wfc/wfc-gateway.jar
|
||||
depends_on:
|
||||
- wfc-redis
|
||||
links:
|
||||
- wfc-redis
|
||||
environment:
|
||||
- NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR}
|
||||
- NACOS_NAME_SPACE=${NACOS_NAME_SPACE}
|
||||
restart: ${RESTART_OPTION}
|
||||
wfc-auth:
|
||||
container_name: wfc-auth
|
||||
build:
|
||||
context: ./wfc/auth
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "${GATEWAY_SERVER_PORT}:${GATEWAY_SERVER_PORT}"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./wfc/auth/jar/wfc-auth.jar:/home/wfc/wfc-auth.jar
|
||||
- ./wfc/gateway/jar/wfc-gateway.jar:/opt/wfc/app.jar
|
||||
depends_on:
|
||||
- wfc-redis
|
||||
links:
|
||||
- wfc-redis
|
||||
environment:
|
||||
- NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR}
|
||||
wfc-redis:
|
||||
condition: service_healthy
|
||||
wfc-nacos:
|
||||
condition: service_healthy
|
||||
# links:
|
||||
# - wfc-redis
|
||||
# - wfc-nacos
|
||||
environment:
|
||||
- NACOS_NAME_SPACE=${NACOS_NAME_SPACE}
|
||||
restart: ${RESTART_OPTION}
|
||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
||||
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
|
||||
- GATEWAY_SERVER_IP=${GATEWAY_SERVER_IP}
|
||||
- GATEWAY_SERVER_PORT=${GATEWAY_SERVER_PORT}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://${GATEWAY_SERVER_IP}:${GATEWAY_SERVER_PORT}/health || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
wfc-auth:
|
||||
image: wfc-java:jre8
|
||||
container_name: wfc-auth
|
||||
# build:
|
||||
# context: ./wfc/auth
|
||||
# dockerfile: dockerfile
|
||||
ports:
|
||||
- "${AUTH_SERVER_PORT}:${AUTH_SERVER_PORT}"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./wfc/auth/jar/wfc-auth.jar:/opt/wfc/app.jar
|
||||
depends_on:
|
||||
wfc-redis:
|
||||
condition: service_healthy
|
||||
wfc-nacos:
|
||||
condition: service_healthy
|
||||
# links:
|
||||
# - wfc-redis
|
||||
environment:
|
||||
- NACOS_NAME_SPACE=${NACOS_NAME_SPACE}
|
||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
||||
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
|
||||
- AUTH_SERVER_IP=${AUTH_SERVER_IP}
|
||||
- AUTH_SERVER_PORT=${AUTH_SERVER_PORT}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://${AUTH_SERVER_IP}:${AUTH_SERVER_PORT}/health || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
wfc-modules-system:
|
||||
image: wfc-java:jre8
|
||||
container_name: wfc-modules-system
|
||||
build:
|
||||
context: ./wfc/modules/system
|
||||
dockerfile: dockerfile
|
||||
# build:
|
||||
# context: ./wfc/modules/system
|
||||
# dockerfile: dockerfile
|
||||
ports:
|
||||
- "9201:9201"
|
||||
- "${WFC_SYSTEM_PORT}:${WFC_SYSTEM_PORT}"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./wfc/modules/system/jar/wfc-modules-system.jar:/home/wfc/wfc-modules-system.jar
|
||||
- ./wfc/modules/system/jar/wfc-modules-system.jar:/opt/wfc/app.jar
|
||||
depends_on:
|
||||
- wfc-redis
|
||||
- wfc-mysql
|
||||
links:
|
||||
- wfc-redis
|
||||
- wfc-mysql
|
||||
wfc-redis:
|
||||
condition: service_healthy
|
||||
wfc-mysql:
|
||||
condition: service_healthy
|
||||
wfc-auth:
|
||||
condition: service_healthy
|
||||
wfc-gateway:
|
||||
condition: service_healthy
|
||||
# links:
|
||||
# - wfc-redis
|
||||
# - wfc-mysql
|
||||
environment:
|
||||
- NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR}
|
||||
- NACOS_NAME_SPACE=${NACOS_NAME_SPACE}
|
||||
restart: ${RESTART_OPTION}
|
||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
||||
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
|
||||
- WFC_SYSTEM_PORT=${WFC_SYSTEM_PORT}
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
wfc-modules-user:
|
||||
image: wfc-java:jre8
|
||||
container_name: wfc-modules-user
|
||||
build:
|
||||
context: ./wfc/modules/user
|
||||
dockerfile: dockerfile
|
||||
# build:
|
||||
# context: ./wfc/modules/user
|
||||
# dockerfile: dockerfile
|
||||
ports:
|
||||
- "9204:9204"
|
||||
- "${WFC_USER_PORT}:${WFC_USER_PORT}"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./wfc/modules/user/jar/wfc-modules-user.jar:/home/wfc/wfc-modules-user.jar
|
||||
- ./wfc/modules/user/jar/wfc-modules-user.jar:/opt/wfc/app.jar
|
||||
depends_on:
|
||||
- wfc-redis
|
||||
- wfc-mysql
|
||||
links:
|
||||
- wfc-redis
|
||||
- wfc-mysql
|
||||
wfc-redis:
|
||||
condition: service_healthy
|
||||
wfc-mysql:
|
||||
condition: service_healthy
|
||||
wfc-auth:
|
||||
condition: service_healthy
|
||||
wfc-gateway:
|
||||
condition: service_healthy
|
||||
# links:
|
||||
# - wfc-redis
|
||||
# - wfc-mysql
|
||||
environment:
|
||||
- NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR}
|
||||
- NACOS_NAME_SPACE=${NACOS_NAME_SPACE}
|
||||
restart: ${RESTART_OPTION}
|
||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
||||
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
|
||||
- WFC_USER_PORT=${WFC_USER_PORT}
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
wfc-modules-job:
|
||||
image: wfc-java:jre8
|
||||
container_name: wfc-modules-job
|
||||
build:
|
||||
context: ./wfc/modules/job
|
||||
dockerfile: dockerfile
|
||||
# build:
|
||||
# context: ./wfc/modules/job
|
||||
# dockerfile: dockerfile
|
||||
ports:
|
||||
- "9203:9203"
|
||||
- "${WFC_JOB_PORT}:${WFC_JOB_PORT}"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./wfc/modules/job/jar/wfc-modules-job.jar:/home/wfc/wfc-modules-job.jar
|
||||
- ./wfc/modules/job/jar/wfc-modules-job.jar:/opt/wfc/app.jar
|
||||
depends_on:
|
||||
- wfc-mysql
|
||||
links:
|
||||
- wfc-mysql
|
||||
wfc-mysql:
|
||||
condition: service_healthy
|
||||
wfc-auth:
|
||||
condition: service_healthy
|
||||
wfc-gateway:
|
||||
condition: service_healthy
|
||||
# links:
|
||||
# - wfc-mysql
|
||||
environment:
|
||||
- NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR}
|
||||
- NACOS_NAME_SPACE=${NACOS_NAME_SPACE}
|
||||
restart: ${RESTART_OPTION}
|
||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
||||
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
|
||||
- WFC_JOB_PORT=${WFC_JOB_PORT}
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
wfc-modules-payment:
|
||||
image: wfc-java:jre8
|
||||
container_name: wfc-modules-payment
|
||||
build:
|
||||
context: ./wfc/modules/payment
|
||||
dockerfile: dockerfile
|
||||
# build:
|
||||
# context: ./wfc/modules/payment
|
||||
# dockerfile: dockerfile
|
||||
ports:
|
||||
- "9306:9306"
|
||||
- "${WFC_PAYMENT_PORT}:${WFC_PAYMENT_PORT}"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./wfc/modules/payment/jar/wfc-modules-payment.jar:/home/wfc/wfc-modules-payment.jar
|
||||
# - ./wfc/modules/payment/logs/:/home/wfc/logs/
|
||||
- ./wfc/modules/payment/config/:/home/wfc/config/payment/
|
||||
- ./wfc/modules/payment/jar/wfc-modules-payment.jar:/opt/wfc/app.jar
|
||||
# - ./wfc/modules/payment/logs/:/opt/wfc/logs/
|
||||
- ./wfc/modules/payment/config/:/opt/wfc/config/payment/
|
||||
depends_on:
|
||||
- wfc-redis
|
||||
- wfc-mysql
|
||||
links:
|
||||
- wfc-redis
|
||||
- wfc-mysql
|
||||
wfc-redis:
|
||||
condition: service_healthy
|
||||
wfc-mysql:
|
||||
condition: service_healthy
|
||||
wfc-auth:
|
||||
condition: service_healthy
|
||||
wfc-gateway:
|
||||
condition: service_healthy
|
||||
# links:
|
||||
# - wfc-redis
|
||||
# - wfc-mysql
|
||||
environment:
|
||||
- NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR}
|
||||
- NACOS_NAME_SPACE=${NACOS_NAME_SPACE}
|
||||
restart: ${RESTART_OPTION}
|
||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
||||
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
|
||||
- WFC_PAYMENT_PORT=${WFC_PAYMENT_PORT}
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
wfc-nginx:
|
||||
image: nginx
|
||||
container_name: wfc-nginx
|
||||
image: nginx
|
||||
build:
|
||||
context: ./nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
- "${WFC_SERVER_PORT}:${WFC_SERVER_PORT}"
|
||||
networks:
|
||||
- wfc-fe-network
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./nginx/html/dist:/home/wfc/portal
|
||||
- ./nginx/html/dist:/opt/wfc/portal
|
||||
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./nginx/logs:/var/log/nginx
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
depends_on:
|
||||
- wfc-gateway
|
||||
links:
|
||||
- wfc-gateway
|
||||
wfc-gateway:
|
||||
condition: service_healthy
|
||||
# links:
|
||||
# - wfc-gateway
|
||||
environment:
|
||||
- GATEWAY_ADDR=${GATEWAY_ADDR}
|
||||
- GATEWAY_SERVER_IP=${GATEWAY_SERVER_IP}
|
||||
- GATEWAY_SERVER_PORT=${GATEWAY_SERVER_PORT}
|
||||
- WFC_SERVER_IP=${WFC_SERVER_IP}
|
||||
- WFC_SERVER_PORT=${WFC_SERVER_PORT}
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
networks:
|
||||
wfc-fe-network:
|
||||
name: wfc-fe-network
|
||||
driver: bridge
|
||||
wfc-be-network:
|
||||
name: wfc-be-network
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.18.0.0/16
|
||||
driver: default
|
||||
21
build/docker/env/default.env
vendored
21
build/docker/env/default.env
vendored
@@ -3,9 +3,22 @@ MYSQL_DATABASE=wfc_system_db
|
||||
WFC_CONFIG_DATABASE=wfc_config_db
|
||||
WFC_SYSTEM_DATABASE=wfc_system_db
|
||||
WFC_USER_DATABASE=wfc_user_db
|
||||
MYSQL_PORT=3306
|
||||
MYSQL_USER=mysql
|
||||
MYSQL_PASSWORD=
|
||||
NACOS_SERVER_ADDR=192.168.13.128:8848
|
||||
MYSQL_PASSWORD=123456
|
||||
REDIS_PORT=6379
|
||||
NACOS_NAME_SPACE=wfc-prod
|
||||
GATEWAY_ADDR=192.168.13.128:8080
|
||||
RESTART_OPTION=on-failure:3
|
||||
WFC_SERVER_PORT=80
|
||||
NACOS_SERVER_PORT=8848
|
||||
GATEWAY_SERVER_PORT=8080
|
||||
AUTH_SERVER_PORT=8081
|
||||
WFC_JOB_PORT=9203
|
||||
WFC_PAYMENT_PORT=9204
|
||||
WFC_SYSTEM_PORT=9205
|
||||
WFC_USER_PORT=9206
|
||||
WFC_SERVER_IP=192.168.13.128
|
||||
NACOS_SERVER_IP=${WFC_SERVER_IP}
|
||||
GATEWAY_SERVER_IP=${WFC_SERVER_IP}
|
||||
AUTH_SERVER_IP=${WFC_SERVER_IP}
|
||||
RESTART_OPTION=on-failure:5
|
||||
|
||||
|
||||
15
build/docker/java/dockerfile
Normal file
15
build/docker/java/dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM openjdk:8-jre
|
||||
|
||||
# 通过挂载-v 来挂载宿主机的文件到容器中 /opt/wfc/app.jar
|
||||
WORKDIR /opt/wfc
|
||||
|
||||
# 设置环境变量
|
||||
ENV JVM_OPTS="-Xms128m -Xmx512m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m"
|
||||
ENV JAVA_OPTS=""
|
||||
ENV JAR_FILE="app.jar"
|
||||
|
||||
# 使用 sh -c 解析环境变量
|
||||
ENTRYPOINT ["sh", "-c", "java -Dfile.encoding=utf-8 ${JVM_OPTS} -jar ${JAR_FILE} ${JAVA_OPTS}"]
|
||||
|
||||
# docker build -t java:jre8 .
|
||||
# docker run -v /home/manager/probject/wfc/wfc-gateway.jar:/app.jar java:jre8
|
||||
@@ -1,7 +1,5 @@
|
||||
# 基础镜像
|
||||
FROM mysql:5.7
|
||||
# author
|
||||
MAINTAINER wfc
|
||||
|
||||
# 执行sql脚本
|
||||
# ENV MYSQL_ROOT_PASSWORD=123456
|
||||
|
||||
@@ -7,7 +7,8 @@ db.password=123456
|
||||
nacos.naming.empty-service.auto-clean=true
|
||||
nacos.naming.empty-service.clean.initial-delay-ms=50000
|
||||
nacos.naming.empty-service.clean.period-time-ms=30000
|
||||
nacos.server.ip=${NACOS_SERVER_ADDR}
|
||||
# nacos.server.ip=${NACOS_SERVER_IP}
|
||||
# nacos.server.port=${NACOS_SERVER_PORT}
|
||||
|
||||
management.endpoints.web.exposure.include=*
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# 基础镜像
|
||||
FROM nacos/nacos-server
|
||||
# author
|
||||
MAINTAINER wfc
|
||||
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
||||
|
||||
@@ -15,7 +15,7 @@ http {
|
||||
server_name localhost;
|
||||
|
||||
location /sys {
|
||||
root /home/wfc/portal;
|
||||
root /opt/wfc/portal;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
@@ -29,7 +29,7 @@ http {
|
||||
}
|
||||
|
||||
location /u {
|
||||
root /home/wfc/portal;
|
||||
root /opt/wfc/portal;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
# 基础镜像
|
||||
FROM nginx
|
||||
# author
|
||||
MAINTAINER wfc
|
||||
# 工作目录
|
||||
WORKDIR /home/wfc/portal
|
||||
WORKDIR /opt/wfc/portal
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||
# 复制html文件到路径
|
||||
COPY ./html /home/wfc/portal
|
||||
COPY ./html /opt/wfc/portal
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
# 基础镜像
|
||||
FROM redis
|
||||
# author
|
||||
MAINTAINER wfc
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/wfc/redis
|
||||
VOLUME /opt/wfc/redis
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/wfc/redis
|
||||
RUN mkdir -p /opt/wfc/redis
|
||||
# 指定路径
|
||||
WORKDIR /home/wfc/redis
|
||||
WORKDIR /opt/wfc/redis
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/redis.conf /home/wfc/redis/redis.conf
|
||||
COPY ./conf/redis.conf /opt/wfc/redis/redis.conf
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER wfc
|
||||
LABEL org.wfc.image.authors="wfc@wfc.org"
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/wfc
|
||||
VOLUME /opt/wfc
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/wfc
|
||||
RUN mkdir -p /opt/wfc
|
||||
# 指定路径
|
||||
WORKDIR /home/wfc
|
||||
WORKDIR /opt/wfc
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/wfc-auth.jar /home/wfc/wfc-auth.jar
|
||||
COPY ./jar/wfc-auth.jar /opt/wfc/wfc-auth.jar
|
||||
# 启动认证服务
|
||||
ENTRYPOINT ["java","-jar","wfc-auth.jar"]
|
||||
@@ -1,15 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER wfc
|
||||
LABEL org.wfc.image.authors="wfc@wfc.org"
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/wfc
|
||||
VOLUME /opt/wfc
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/wfc
|
||||
RUN mkdir -p /opt/wfc
|
||||
# 指定路径
|
||||
WORKDIR /home/wfc
|
||||
WORKDIR /opt/wfc
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/wfc-gateway.jar /home/wfc/wfc-gateway.jar
|
||||
COPY ./jar/wfc-gateway.jar /opt/wfc/wfc-gateway.jar
|
||||
# 启动网关服务
|
||||
ENTRYPOINT ["java","-jar","wfc-gateway.jar"]
|
||||
@@ -1,15 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER wfc
|
||||
LABEL org.wfc.image.authors="wfc@wfc.org"
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/wfc
|
||||
VOLUME /opt/wfc
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/wfc
|
||||
RUN mkdir -p /opt/wfc
|
||||
# 指定路径
|
||||
WORKDIR /home/wfc
|
||||
WORKDIR /opt/wfc
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/wfc-modules-file.jar /home/wfc/wfc-modules-file.jar
|
||||
COPY ./jar/wfc-modules-file.jar /opt/wfc/wfc-modules-file.jar
|
||||
# 启动文件服务
|
||||
ENTRYPOINT ["java","-jar","wfc-modules-file.jar"]
|
||||
@@ -1,15 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER wfc
|
||||
LABEL org.wfc.image.authors="wfc@wfc.org"
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/wfc
|
||||
VOLUME /opt/wfc
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/wfc
|
||||
RUN mkdir -p /opt/wfc
|
||||
# 指定路径
|
||||
WORKDIR /home/wfc
|
||||
WORKDIR /opt/wfc
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/wfc-modules-gen.jar /home/wfc/wfc-modules-gen.jar
|
||||
COPY ./jar/wfc-modules-gen.jar /opt/wfc/wfc-modules-gen.jar
|
||||
# 启动代码生成服务
|
||||
ENTRYPOINT ["java","-jar","wfc-modules-gen.jar"]
|
||||
@@ -1,15 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER wfc
|
||||
LABEL org.wfc.image.authors="wfc@wfc.org"
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/wfc
|
||||
VOLUME /opt/wfc
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/wfc
|
||||
RUN mkdir -p /opt/wfc
|
||||
# 指定路径
|
||||
WORKDIR /home/wfc
|
||||
WORKDIR /opt/wfc
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/wfc-modules-job.jar /home/wfc/wfc-modules-job.jar
|
||||
COPY ./jar/wfc-modules-job.jar /opt/wfc/wfc-modules-job.jar
|
||||
# 启动定时任务服务
|
||||
ENTRYPOINT ["java","-jar","wfc-modules-job.jar"]
|
||||
@@ -4,12 +4,12 @@ FROM openjdk:8-jre
|
||||
LABEL org.wfc.image.authors="wfc@wfc.org"
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/wfc
|
||||
VOLUME /opt/wfc
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/wfc
|
||||
RUN mkdir -p /opt/wfc
|
||||
# 指定路径
|
||||
WORKDIR /home/wfc
|
||||
WORKDIR /opt/wfc
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/wfc-modules-payment.jar /home/wfc/wfc-modules-payment.jar
|
||||
COPY ./jar/wfc-modules-payment.jar /opt/wfc/wfc-modules-payment.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","wfc-modules-payment.jar"]
|
||||
@@ -1,15 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER wfc
|
||||
LABEL org.wfc.image.authors="wfc@wfc.org"
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/wfc
|
||||
VOLUME /opt/wfc
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/wfc
|
||||
RUN mkdir -p /opt/wfc
|
||||
# 指定路径
|
||||
WORKDIR /home/wfc
|
||||
WORKDIR /opt/wfc
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/wfc-modules-system.jar /home/wfc/wfc-modules-system.jar
|
||||
COPY ./jar/wfc-modules-system.jar /opt/wfc/wfc-modules-system.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","wfc-modules-system.jar"]
|
||||
@@ -1,15 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER wfc
|
||||
LABEL org.wfc.image.authors="wfc@wfc.org"
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/wfc
|
||||
VOLUME /opt/wfc
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/wfc
|
||||
RUN mkdir -p /opt/wfc
|
||||
# 指定路径
|
||||
WORKDIR /home/wfc
|
||||
WORKDIR /opt/wfc
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/wfc-modules-user.jar /home/wfc/wfc-modules-user.jar
|
||||
COPY ./jar/wfc-modules-user.jar /opt/wfc/wfc-modules-user.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","wfc-modules-user.jar"]
|
||||
@@ -1,15 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER wfc
|
||||
LABEL org.wfc.image.authors="wfc@wfc.org"
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/wfc
|
||||
VOLUME /opt/wfc
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/wfc
|
||||
RUN mkdir -p /opt/wfc
|
||||
# 指定路径
|
||||
WORKDIR /home/wfc
|
||||
WORKDIR /opt/wfc
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/wfc-visual-monitor.jar /home/wfc/wfc-visual-monitor.jar
|
||||
COPY ./jar/wfc-visual-monitor.jar /opt/wfc/wfc-visual-monitor.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","wfc-visual-monitor.jar"]
|
||||
Reference in New Issue
Block a user