add drone config

This commit is contained in:
Jay 2018-08-17 22:39:19 +08:00
parent cb545db298
commit 17280674ba
3 changed files with 13 additions and 6 deletions

9
.drone.yml Normal file
View File

@ -0,0 +1,9 @@
pipeline:
docker:
image: plugins/docker
registry: docker.mtfos.xyz
repo: docker.mtfos.xyz/mtfos/bot
dockerfile: Dockerfile
tags: [latest, $$COMMIT]
when:
branch: release

View File

@ -1,13 +1,12 @@
FROM node:8
FROM node:8-alpine
LABEL maintainer="Jay <admin@trj.tw>"
ENV NODE_PORT 5111
RUN mkdir -p /data
WORKDIR /data
COPY . .
RUN rm -f .env
RUN apt-get update -qqy \
&& apt-get install -qqy imagemagick graphicsmagick \
&& apt-get clean
RUN apk update && \
apk add imagemagick graphicsmagick git curl wget bash mc build-base python
RUN npm install
EXPOSE ${NODE_PORT}
CMD ["npm", "run", "dbrun"]

View File

@ -7,8 +7,7 @@
"start": "node index.js 2>&1 | tee runtime.txt",
"dbtool": "node bin/dbtool",
"dbrun": "npm run dbtool && npm start",
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "npm i otakukaze/koa-session2#master"
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "JayChen",