Commit 7b0c086f authored by jan.koester's avatar jan.koester
Browse files

test

parent c16a9610
Loading
Loading
Loading
Loading
+1 −2
Changes for Dockerfile: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
@@ -63,6 +63,5 @@ COPY --from=build /usr/local/share/blogi /usr/local/share/blogi
COPY --from=build /usr/local/lib /usr/local/lib
COPY --from=build /usr/local/lib/blogi/plugins /usr/local/lib/blogi/plugins

COPY config.yaml /etc/blogi

CMD ["blogi","-F","true","-c","yaml://etc/blogi/config.yaml"]
CMD ["/usr/local/sbin/run.sh"]
−x−18

File deleted.

+x+27
Changes for run.sh: 27 added lines, 0 removed lines.
Original line number Diff line number Diff line
#!/bin/bash

if [ ! -f /etc/blogi/config.yaml ]; then

    if [ ! -d /etc/blogi ]; then
        mkdir /etc/blogi
    fi

    CLIENTSECRET=$(pwgen -1)

    authcli addclient -h $CLIENTURL -n $(hostname) -u $USERNAME -p $PASSWORD -s $CLIENTSECRET

    sed  -e "s|%CLIENTURL%|$CLIENTURL|g" \
    -e "s|%CLIENTNAME%|$(hostname)|g" \
    -e "s|%CLIENTSECRET%|$CLIENTSECRET|g" \
    -e "s|%HOSTNAME%|$(hostname)|g" \
    -e "s|%DBDRIVER%|$DBDRIVER|g" \
    -e "s|%DBOPTIONS%|$DBOPTIONS|g" \
    -e "s|%PORT%|$PORT|g" \
    -e "s|%BINDADDR%|$BINDADDR|g" \
    -e "s|%MAXCON%|$MAXCON|g" \
    -e "s|%PREFIX%|$PREFIX|g" \
    -e "s|%REMOTEURL%|$REMOTEURL|g" \
    docker-config.yaml > /etc/blogi/config.yaml
fi

/usr/local/bin/blogi -F true -c "yaml://etc/blogi/config.yaml"