initial commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Aleksander Cynarski 2021-03-27 11:57:35 +01:00
commit 82009192e3
Signed by: paramah
GPG Key ID: C4340BA42B9C173A
5 changed files with 84 additions and 0 deletions

35
.drone.yml Normal file
View File

@ -0,0 +1,35 @@
kind: pipeline
name: default
steps:
- name: docker
image: plugins/docker
settings:
username:
from_secret: hub_username
password:
from_secret: hub_password
repo:
from_secret: hub_repo
tags: latest
when:
branch:
- master
- name: notify
image: appleboy/drone-telegram
settings:
token:
from_secret: telegram_bot_token
to:
from_secret: telegram_group_id
message: >
{{#success build.status}}
build {{build.link}} triggerd by {{commit.link}} from {{commit.author}} succeeded
{{else}}
build {{build.link}} triggerd by {{commit.link}} from {{commit.author}} failed
{{/success}}
when:
status:
- success
- failure

19
DOCKER_DEPLOY.md Normal file
View File

@ -0,0 +1,19 @@
# Drone docker deploy
## Użycie
```
cat ${args[0]} |awk -F\= '{system("drone secret add --repository='${args[1]}' --name="$1 " --data="$2)}'
```
Wymagane zmienne:
```
hub_username=
hub_password=
hub_repo=
telegram_bot_token=
telegram_group_id=
```

24
Dockerfile Normal file
View File

@ -0,0 +1,24 @@
FROM paramah/base:alpine as base-config
FROM alpine
MAINTAINER Aleksander Cynarski <aleksander@cynarski.pl>
COPY --from=base-config /etc/supervisor /etc/supervisor
RUN set -xe \
&& apk add --no-cache wget curl bash openssh supervisor tinyproxy \
&& sed -i -e '/^Allow /s/^/#/' \
-e '/^ConnectPort /s/^/#/' \
-e '/^#DisableViaHeader /s/^#//' \
/etc/tinyproxy/tinyproxy.conf
ENV DOCKERIZE_VERSION v0.6.1
# Install dockerize
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz
COPY docker/etc /etc
EXPOSE 8888
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]

View File

View File

@ -0,0 +1,6 @@
[program:tinyproxy]
command=/usr/bin/tinyproxy -d
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true