demo ci
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
8572222960
commit
ad8f790e18
|
@ -0,0 +1 @@
|
|||
node_modules
|
109
.drone.yml
109
.drone.yml
|
@ -7,99 +7,24 @@ trigger:
|
|||
|
||||
steps:
|
||||
|
||||
- name: net
|
||||
image: praqma/network-multitool
|
||||
commands:
|
||||
- ifconfig
|
||||
- ping -c 2 bucket || true
|
||||
|
||||
- name: upload
|
||||
image: plugins/s3
|
||||
- name: build-docker-image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
endpoint: http://bucket:9000
|
||||
access_key:
|
||||
from_secret: bucket_access_key
|
||||
secret_key:
|
||||
from_secret: bucket_secret_key
|
||||
bucket: dronetest
|
||||
path_style: true
|
||||
source: src/*
|
||||
target: /
|
||||
username:
|
||||
from_secret: docker_reg_username
|
||||
password:
|
||||
from_secret: docker_reg_password
|
||||
repo: docker.zcj.plus/drone-ci/fe
|
||||
tags: latest
|
||||
registry: https://docker.zcj.plus
|
||||
|
||||
|
||||
|
||||
|
||||
# - name: rebuild
|
||||
# image: drillster/drone-volume-cache
|
||||
# volumes:
|
||||
# - name: modules
|
||||
# path: /cache
|
||||
# settings:
|
||||
# rebuild: true
|
||||
# mount:
|
||||
# - .env
|
||||
|
||||
# - name: restore-modules
|
||||
# image: drillster/drone-volume-cache
|
||||
# volumes:
|
||||
# - name: modules
|
||||
# path: /cache
|
||||
# settings:
|
||||
# restore: true
|
||||
# mount:
|
||||
# - ./node_modules
|
||||
# - ./yarn.lock
|
||||
|
||||
# - name: build
|
||||
# image: node:12.16.1
|
||||
# - name: prepare-deploy-file
|
||||
# image: apline
|
||||
# commands:
|
||||
# - yarn
|
||||
# - yarn build:prod
|
||||
# - echo -e ""
|
||||
|
||||
# - name: rebuild-modules
|
||||
# image: drillster/drone-volume-cache
|
||||
# volumes:
|
||||
# - name: modules
|
||||
# path: /cache
|
||||
# settings:
|
||||
# rebuild: true
|
||||
# mount:
|
||||
# - ./node_modules
|
||||
# - ./yarn.lock
|
||||
|
||||
# - name: scp
|
||||
# image: appleboy/drone-scp
|
||||
# settings:
|
||||
# host: 124.156.152.247
|
||||
# username:
|
||||
# from_secret: ssh_username
|
||||
# password:
|
||||
# from_secret: ssh_pwd
|
||||
# port: 8011
|
||||
# target:
|
||||
# - /mnt/d/deploy/fe/cidemoadmin
|
||||
# source:
|
||||
# - dist
|
||||
# - docker-compose.yml
|
||||
# - nginx.conf
|
||||
# - frpc.ini
|
||||
|
||||
# - name: deploy
|
||||
# image: appleboy/drone-ssh
|
||||
# settings:
|
||||
# host: 124.156.152.247
|
||||
# username:
|
||||
# from_secret: ssh_username
|
||||
# password:
|
||||
# from_secret: ssh_pwd
|
||||
# port: 8011
|
||||
# script:
|
||||
# - cd /mnt/d/deploy/fe/cidemoadmin
|
||||
# - docker-compose down
|
||||
# - docker-compose up -d
|
||||
# - docker-compose logs
|
||||
|
||||
volumes:
|
||||
- name: modules
|
||||
host:
|
||||
path: /mnt/d/ci_volumes
|
||||
- name: deploy
|
||||
image: docker/compose
|
||||
commands:
|
||||
- docker-compose up -d
|
||||
- docker-compose logs -f
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
FROM node:lts
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN yarn global add http-server && \
|
||||
npm install pm2 -g && \
|
||||
yarn && \
|
||||
yarn build:prod
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
# CMD ["http-server","/src/dist","-p","80"]
|
||||
|
||||
CMD ["bash","http.sh"]
|
|
@ -2,11 +2,8 @@ version: '3'
|
|||
|
||||
services:
|
||||
|
||||
nginx:
|
||||
image: nginx:1.19.2
|
||||
volumes:
|
||||
- ./dist:/var/www
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||
web:
|
||||
image: docker.zcj.plus/drone-ci/fe
|
||||
networks:
|
||||
- feadmindroneci
|
||||
|
||||
|
@ -17,7 +14,7 @@ services:
|
|||
volumes:
|
||||
- ./frpc.ini:/etc/frp/frpc.ini
|
||||
depends_on:
|
||||
- nginx
|
||||
- web
|
||||
restart: always
|
||||
|
||||
networks:
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
pm2 start http-server -i 4 -- /src/dist -p 80
|
||||
|
||||
pm2 monit
|
10
nginx.conf
10
nginx.conf
|
@ -66,9 +66,13 @@ http {
|
|||
server_name demo-admin.ryio.cn;
|
||||
|
||||
location / {
|
||||
root /var/www;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
|
||||
proxy_pass http://wev/;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue