Initial commit with taskd building from latest git.
This commit is contained in:
commit
1f5f1d5c5d
42
.drone.yml
Normal file
42
.drone.yml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: build
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: notify-start
|
||||||
|
image: pztrn/discordrone
|
||||||
|
settings:
|
||||||
|
webhook_id:
|
||||||
|
from_secret: discord_webhook_id
|
||||||
|
webhook_token:
|
||||||
|
from_secret: discord_webhook_secret
|
||||||
|
message: 'Starting building **{{repo.name}}#{{build.number}}@{{build.commit}}** @ {{datetime build.started "02-Jan-2006 15:04:05 MST" "Asia/Yekaterinburg"}} (See {{build.link}} for logs).'
|
||||||
|
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: dockerhub_user
|
||||||
|
password:
|
||||||
|
from_secret: dockerhub_password
|
||||||
|
repo: pztrn/taskd
|
||||||
|
auto_tag: true
|
||||||
|
|
||||||
|
- name: notify-end
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
image: pztrn/discordrone
|
||||||
|
settings:
|
||||||
|
webhook_id:
|
||||||
|
from_secret: discord_webhook_id
|
||||||
|
webhook_token:
|
||||||
|
from_secret: discord_webhook_secret
|
||||||
|
message: "
|
||||||
|
{{#success build.status}}
|
||||||
|
**{{repo.name}}#{{build.number}}@{{build.commit}}** deployed.
|
||||||
|
{{ else }}
|
||||||
|
**{{repo.name}}#{{build.number}}@{{build.commit}}** failed. See {{build.link}}.
|
||||||
|
{{/success}}"
|
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
FROM alpine:3.11
|
||||||
|
|
||||||
|
COPY ./taskd.sh /usr/bin
|
||||||
|
|
||||||
|
RUN apk add --no-cache --virtual build-dependencies \
|
||||||
|
gnutls-dev \
|
||||||
|
libuuid \
|
||||||
|
cmake \
|
||||||
|
git \
|
||||||
|
build-base \
|
||||||
|
util-linux-dev; \
|
||||||
|
git clone https://github.com/GothenburgBitFactory/taskserver.git && cd taskserver; \
|
||||||
|
git submodule init; git submodule update; \
|
||||||
|
mkdir build && cd build; \
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..; \
|
||||||
|
make; \
|
||||||
|
make install; \
|
||||||
|
cd ../.. && rm -rf taskserver; \
|
||||||
|
apk del --purge build-dependencies; \
|
||||||
|
apk add --no-cache gnutls libuuid util-linux bash libgcc libstdc++; \
|
||||||
|
mkdir /var/taskd && chmod +x /usr/bin/taskd.sh
|
||||||
|
|
||||||
|
ENV TASKDATA /var/taskd
|
||||||
|
|
||||||
|
VOLUME ["/var/taskd"]
|
||||||
|
EXPOSE 53589
|
||||||
|
CMD ["/usr/bin/taskd.sh"]
|
23
taskd.sh
Normal file
23
taskd.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copy'd from https://github.com/mrdaemon/taskd-server/
|
||||||
|
export TASKDDATA=/var/taskd
|
||||||
|
|
||||||
|
if [[ ! -w $TASKDDATA ]] ; then
|
||||||
|
>&2 echo "Warning: Home directory \"$TASKDDATA\" is not writable."
|
||||||
|
>&2 echo " Did you set permissions on the volume correctly?"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Refresh example configuration
|
||||||
|
if [[ -d $TASKDDATA/example ]] ; then
|
||||||
|
rm -rf "$TASKDDATA/example"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$TASKDDATA/example" || exit 1
|
||||||
|
taskd init --data "$TASKDDATA/example"
|
||||||
|
|
||||||
|
# Print version and diagnostics to logs
|
||||||
|
taskd diagnostics --data "$TASKDDATA"
|
||||||
|
|
||||||
|
# Hand off to taskd
|
||||||
|
exec taskd server
|
Loading…
Reference in New Issue
Block a user