feat: docker 部署
parent
17eb191d31
commit
7d99597109
@ -0,0 +1,19 @@
|
||||
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# css
|
||||
src/**/*.css
|
||||
build
|
||||
build.zip
|
@ -1,17 +0,0 @@
|
||||
# BUILDING
|
||||
FROM node:lts-alpine AS builder
|
||||
|
||||
LABEL maintainer="llitfkitfk@gmail.com"
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache git
|
||||
RUN git clone --depth 1 https://github.com/thx/rap2-dolores.git ./
|
||||
RUN yarn install
|
||||
COPY config/config.prod.ts ./src/config/config.prod.ts
|
||||
RUN yarn run lint
|
||||
RUN yarn run build
|
||||
|
||||
# nginx
|
||||
FROM nginx:stable-alpine
|
||||
|
||||
COPY --from=builder /app/build /app
|
@ -1,9 +0,0 @@
|
||||
const config: IConfig = {
|
||||
serve: 'http://localhost:38080',
|
||||
keys: ['some secret hurr'],
|
||||
session: {
|
||||
key: 'koa:sess',
|
||||
},
|
||||
}
|
||||
|
||||
export default config
|
@ -1,17 +0,0 @@
|
||||
server {
|
||||
listen 38080;
|
||||
server_name localhost;
|
||||
|
||||
#charset koi8-r;
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
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_set_header X-Nginx-Proxy true;
|
||||
proxy_set_header Connection "";
|
||||
proxy_pass http://delos:8080/;
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
server {
|
||||
listen 38081;
|
||||
server_name localhost;
|
||||
|
||||
root /app;
|
||||
#charset koi8-r;
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue