refactor: deploy

master
xiaojunnuo 2021-02-08 21:16:56 +08:00
parent ff8e02cceb
commit 12fec7939d
13 changed files with 534 additions and 1264 deletions

0
build/Dockerfile Normal file
View File

View File

@ -0,0 +1,5 @@
FROM node:15.8.0
ENV TZ=Asia/Shanghai
EXPOSE 3000
ADD ./* /app/
ENTRYPOINT node /app/bin/www.js

View File

@ -3,7 +3,7 @@ import { accessProviderRegistry } from '@certd/api'
import _ from 'lodash-es'
import { Ret } from '../models/Ret.js'
const router = Router()
router.prefix('/access-providers')
router.prefix('/api/access-providers')
router.get('/list', function (ctx, next) {
const list = []

View File

@ -3,7 +3,7 @@ import { dnsProviderRegistry } from '@certd/api'
import _ from 'lodash-es'
import { Ret } from '../models/Ret.js'
const router = Router()
router.prefix('/dns-providers')
router.prefix('/api/dns-providers')
router.get('/list', function (ctx, next) {
const list = []

View File

@ -3,7 +3,7 @@ import fs from 'fs'
import exportsService from '../service/exports-service.js'
const router = Router()
router.prefix('/exports')
router.prefix('/api/exports')
router.post('/toZip', async function (ctx, next) {
// const request = ctx.request

View File

@ -1,7 +1,7 @@
import Router from 'koa-router'
const router = Router()
router.get('/', async (ctx, next) => {
router.get('/api/', async (ctx, next) => {
await ctx.render('index', {
title: 'Hello CertD!'
})

View File

@ -3,7 +3,7 @@ import { pluginRegistry } from '@certd/api'
import _ from 'lodash-es'
import { Ret } from '../models/Ret.js'
const router = Router()
router.prefix('/plugins')
router.prefix('/api/plugins')
router.get('/list', function (ctx, next) {
const list = []

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
its ok
</body>
</html>

View File

@ -0,0 +1 @@
VUE_APP_API=/api

File diff suppressed because it is too large Load Diff

View File

@ -9,9 +9,8 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@certd/dns-providers": "^0.1.13",
"@certd/plugins": "^0.1.13",
"ant-design-vue": "^2.0.0",
"axios": "^0.21.1",
"core-js": "^3.8.1",
"lodash-es": "^4.17.20",
"vue": "^3.0.4",

View File

@ -160,10 +160,10 @@
<d-container>
<template #header>
<div><a-button @click="exportsToZip"></a-button></div>
<br/>
<div> <a-button @click="exportsToJson">options.json</a-button></div>
<div><a-button @click="exportsToZip"></a-button></div>
<br/>
<!-- <div> <a-button @click="exportsToJson">options.json</a-button></div>-->
<!-- <br/>-->
</template>
<pre class="json">{{options}}</pre>