diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..0db1f86 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,26 @@ +--- +kind: pipeline +type: docker +name: default + +platform: + os: linux + arch: arm + +steps: + - name: build + image: python:alpine + commands: + - pip install --no-cache-dir -r requirements.txt + - pip install . + + - name: docker + image: plugins/docker + settings: + repo: nemunaire/nemubot + auto_tag: true + auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} + username: + from_secret: docker_username + password: + from_secret: docker_password diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0a345e2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM python:alpine as pybuild + +WORKDIR /usr/src/app + +COPY requirements.txt ./ +RUN apk add --no-cache bash build-base capstone-dev && \ + pip install --no-cache-dir -r requirements.txt && \ + pip install bs4 capstone dnspython + + +FROM python:alpine + +RUN apk add --no-cache capstone w3m + +WORKDIR /usr/src/app + +VOLUME /var/lib/nemubot + +COPY requirements.txt ./ + +COPY --from=pybuild /usr/lib/python3.9 /usr/lib/python3.9 +COPY . . + +ENTRYPOINT [ "python", "-m", "nemubot", "-d", "-M", "/usr/src/app/modules" ] +CMD [ "-D", "/var/lib/nemubot" ] \ No newline at end of file