Compare commits

...

2 commits

Author SHA1 Message Date
Jan Christian Grünhage 9eb963b4e2 feat: template pki/vars
All checks were successful
the build was successful
instead of copying the default vars file, that is wrong for nearly everyone,
this commit adds a jinja2 template that takes data from the environment

fixes #3
2018-06-22 22:22:07 +02:00
Jan Christian Grünhage feb99f2e78 Fix behaviour when taskd exits 2018-06-22 20:58:38 +02:00
4 changed files with 12 additions and 3 deletions

View file

@ -10,7 +10,9 @@ RUN apk add --no-cache \
su-exec \
bash \
taskd \
taskd-pki
taskd-pki \
py2-pip \
&& pip2 install j2cli
COPY docker/root /

View file

@ -1,2 +1,2 @@
#!/bin/bash
s6-svc -O /etc/s6.d/taskd
s6-svscanctl -t /etc/s6.d

View file

@ -12,7 +12,7 @@ if [ ! -f ${TASKDDATA}/config ]; then
# Copy tools for certificates generation and generate it
cp /usr/share/taskd/pki/generate* ${TASKDDATA}/pki
cp /usr/share/taskd/pki/vars ${TASKDDATA}/pki
j2 /usr/share/taskd/vars.j2 > ${TASKDDATA}/pki/vars
cd ${TASKDDATA}/pki
./generate
cd /

View file

@ -0,0 +1,7 @@
BITS={{ BITS | default(4096) }}
EXPIRATION_DAYS={{ EXPIRATION_DAYS | default(3650) }}
ORGANIZATION={{ ORGANIZATION | default("") }}
CN={{ CN | default("localhost") }}
COUNTRY={{ COUNTRY | default("") }}
STATE={{ STATE | default("") }}
LOCALITY={{ LOCALITY | default("") }}