diff --git a/.ci/Dockerfile b/.ci/Dockerfile new file mode 100644 index 0000000..89d5dde --- /dev/null +++ b/.ci/Dockerfile @@ -0,0 +1,4 @@ +# 选择更小体积的基础镜像 +FROM nginx:stable-alpine +COPY ./default.conf /etc/nginx/conf.d +COPY ./dist /usr/share/nginx/html \ No newline at end of file diff --git a/.ci/docker-compose.build.yaml b/.ci/docker-compose.build.yaml new file mode 100644 index 0000000..df06d77 --- /dev/null +++ b/.ci/docker-compose.build.yaml @@ -0,0 +1,12 @@ +version: "3.9" + +services: + ms-service: + build: + dockerfile: Dockerfile + context: . + tags: + - "${IMAGE_NAME}:${IMAGE_TAG_LATEST}" + - "${IMAGE_NAME}:${IMAGE_TAG_COMMIT}" + - "${REGISTER_HOST}/${REGISTER_REPO}/${IMAGE_NAME}:${IMAGE_TAG_LATEST}" + - "${REGISTER_HOST}/${REGISTER_REPO}/${IMAGE_NAME}:${IMAGE_TAG_COMMIT}" \ No newline at end of file diff --git a/.ci/docker-compose.yaml b/.ci/docker-compose.yaml new file mode 100644 index 0000000..805975e --- /dev/null +++ b/.ci/docker-compose.yaml @@ -0,0 +1,31 @@ +#版本 +version: '3.9' + +x-template: + service: &service_tmp + restart: always + tty: true + deploy: + resources: + limits: + cpus: '2' + memory: 1G + reservations: + cpus: '0.5' + memory: 256M + extra_hosts: + - "yg.dt.io:192.168.1.5" + +#服务配置 +services: + + emergency-screen: + <<: *service_tmp + container_name: es_${PROFILE_NAME} + hostname: es_${PROFILE_NAME} + image: ${IMAGE_NAME}:${IMAGE_TAG_LATEST} + +networks: + default: + name: ${NETWORK_NAME} + external: true