ci
continuous-integration/drone/push Build is failing Details

This commit is contained in:
周炽键 2021-06-02 21:28:20 +08:00
parent ea04344ead
commit 7e2123e1da
5 changed files with 181 additions and 15 deletions

View File

@ -43,22 +43,31 @@ steps:
password:
from_secret: ssh_pwd
port: 8011
target: /mnt/d/deploy/node/UserModule
source: dist/*
target:
- /mnt/d/deploy/node/UserModule
- /mnt/d/deploy/node/UserModule
- /mnt/d/deploy/node/UserModule/conf
- /mnt/d/deploy/node/UserModule/conf
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:
# - echo hello
# - echo world
# - ls -l
- 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/node/UserModule
- docker-compose down
- docker-compose up -d
- docker-compose logs
volumes:
- name: modules

5
Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM nginx
COPY dist /src
RUN yarn global add pm2

24
docker-compose.yml Normal file
View File

@ -0,0 +1,24 @@
version: '3'
services:
nginx:
image: nginx:1.19.2
volumes:
- ./dist:/var/www
- ./conf/nginx.conf:/etc/nginx/conf
networks:
- feadmindroneci
frpc:
image: snowdreamtech/frpc
networks:
- feadmindroneci
volumes:
- ./frpc.ini:/etc/frp/frpc.ini
depends_on:
- nginx
restart: always
networks:
- feadmindroneci

18
frpc.ini Normal file
View File

@ -0,0 +1,18 @@
[common]
server_addr = 124.156.152.247
server_port = 7000
token = zhouchijian
log_file = ./frpc.log
admin_addr = 127.0.0.1
admin_port = 7400
admin_user = admin
admin_pwd = 39zcj
[http-demo-admin-ci]
type = http
custom_domains = demo-admin.ryio.cn
local_ip = nginx
local_port = 80
remote_port = 80
use_encryption = true
use_compression = true

110
nginx.conf Normal file
View File

@ -0,0 +1,110 @@
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
upstream netdata-backend {
server 127.0.0.1:19999;
keepalive 64;
}
upstream openwrt {
server 192.168.1.1;
keepalive 64;
}
server {
listen 80;
server_name demo-admin.zcj.plus;
location / {
root /var/www/dist;
index index.html;
try_files $uri $uri/ /index.html;
}
}
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}