This commit is contained in:
commit
82009192e3
35
.drone.yml
Normal file
35
.drone.yml
Normal 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
19
DOCKER_DEPLOY.md
Normal 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
24
Dockerfile
Normal 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"]
|
0
docker/etc/supervisor/services/.gitkeep
Normal file
0
docker/etc/supervisor/services/.gitkeep
Normal file
6
docker/etc/supervisor/services/tinyproxy.conf
Normal file
6
docker/etc/supervisor/services/tinyproxy.conf
Normal 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
|
Loading…
Reference in New Issue
Block a user