update
init
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
cd /usr/share/nginx/html
|
||||
tar -xzvf dist.tar.gz
|
||||
if [ -f "dist.tar.gz" ]; then
|
||||
tar -xzvf dist.tar.gz
|
||||
rm dist.tar.gz
|
||||
fi
|
||||
@@ -0,0 +1,5 @@
|
||||
# 选择更小体积的基础镜像
|
||||
FROM nginx:stable-alpine
|
||||
COPY ./default.conf /etc/nginx/conf.d
|
||||
COPY --chmod=776 ./40-decompress-dist.sh /docker-entrypoint.d
|
||||
COPY ./dist.tar.gz /usr/share/nginx/html
|
||||
@@ -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}"
|
||||
@@ -0,0 +1,44 @@
|
||||
#版本
|
||||
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:
|
||||
|
||||
cms:
|
||||
<<: *service_tmp
|
||||
container_name: cms_${PROFILE_NAME}
|
||||
hostname: cms_${PROFILE_NAME}
|
||||
image: ${REGISTER_HOST}/${REGISTER_REPO}/${PROJECT_NAME}_cms:${IMAGE_TAG_LATEST}
|
||||
|
||||
im:
|
||||
<<: *service_tmp
|
||||
container_name: im_${PROFILE_NAME}
|
||||
hostname: im_${PROFILE_NAME}
|
||||
image: ${REGISTER_HOST}/${REGISTER_REPO}/${PROJECT_NAME}_im:${IMAGE_TAG_LATEST}
|
||||
|
||||
mobile:
|
||||
<<: *service_tmp
|
||||
container_name: mobile_${PROFILE_NAME}
|
||||
hostname: mobile_${PROFILE_NAME}
|
||||
image: ${REGISTER_HOST}/${REGISTER_REPO}/${PROJECT_NAME}_mobile:${IMAGE_TAG_LATEST}
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${NETWORK_NAME}
|
||||
external: true
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
location /static/im-web {
|
||||
alias /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /static/im-web/index.html;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
location /static/mobile {
|
||||
alias /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /static/mobile/index.html;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user