-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add bareos 22
- Loading branch information
Showing
17 changed files
with
237 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM python:3.10-alpine | ||
|
||
LABEL maintainer="barcus@tou.nu" | ||
|
||
ARG BUILD_DATE | ||
ARG NAME | ||
ARG VCS_REF | ||
ARG VERSION | ||
|
||
LABEL org.label-schema.schema-version="1.0" \ | ||
org.label-schema.build-date=$BUILD_DATE \ | ||
org.label-schema.name=$NAME \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url="https://github.com/barcus/bareos" \ | ||
org.label-schema.version=$VERSION | ||
|
||
RUN pip install --no-cache-dir --upgrade pip==22.0.4 | ||
|
||
RUN adduser -D bareos | ||
USER bareos | ||
WORKDIR /home/bareos | ||
|
||
ENV PATH="/home/bareos/.local/bin:${PATH}" | ||
RUN pip install --no-cache-dir "bareos-restapi>=22*,<23*" | ||
|
||
COPY --chown=bareos docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod a+x /docker-entrypoint.sh | ||
|
||
EXPOSE 8000 | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["uvicorn","--log-level", "debug", "--host", "0.0.0.0", "bareos_restapi:app", "--reload"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env ash | ||
#set -x | ||
|
||
secret=`tr -cd "[:alnum:]" < /dev/urandom | fold -w30 | head -n1` | ||
|
||
# Generate api.ini config | ||
cat <<EOF > /home/bareos/api.ini | ||
[Director] | ||
Name=${BAREOS_DIR_HOST} | ||
Address=${BAREOS_DIR_HOST} | ||
Port=9101 | ||
[JWT] | ||
secret_key = ${secret} | ||
algorithm = HS256 | ||
access_token_expire_minutes = 30 | ||
EOF | ||
|
||
# Run Dockerfile CMD | ||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Dockerfile Bareos client/file daemon | ||
FROM alpine:3.20 | ||
|
||
LABEL maintainer="barcus@tou.nu" | ||
|
||
ARG BUILD_DATE | ||
ARG NAME | ||
ARG VCS_REF | ||
ARG VERSION | ||
|
||
ENV BAREOS_DAEMON_USER bareos | ||
ENV BAREOS_DAEMON_GROUP bareos | ||
|
||
LABEL org.label-schema.schema-version="1.0" \ | ||
org.label-schema.build-date=$BUILD_DATE \ | ||
org.label-schema.name=$NAME \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url="https://github.com/barcus/bareos" \ | ||
org.label-schema.version=$VERSION | ||
|
||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"] | ||
|
||
RUN apk add --no-cache bareos-filedaemon openssh-client tar shadow bash su-exec | ||
|
||
RUN tar czf /bareos-fd.tgz /etc/bareos/bareos-fd.d | ||
RUN mkdir /run/bareos \ | ||
&& chown bareos /run/bareos | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod a+x /docker-entrypoint.sh | ||
|
||
EXPOSE 9102 | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["/usr/sbin/bareos-fd", "-f"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Bareos director Dockerfile | ||
FROM alpine:3.20 | ||
|
||
LABEL maintainer="barcus@tou.nu" | ||
|
||
ARG BUILD_DATE | ||
ARG NAME | ||
ARG VCS_REF | ||
ARG VERSION | ||
|
||
LABEL org.label-schema.schema-version="1.0" \ | ||
org.label-schema.build-date=$BUILD_DATE \ | ||
org.label-schema.name=$NAME \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url="https://github.com/barcus/bareos" \ | ||
org.label-schema.version=$VERSION | ||
|
||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"] | ||
|
||
RUN apk add --no-cache bareos bareos-postgresql postgresql-client curl tzdata tar | ||
|
||
RUN tar czf /bareos-dir.tgz /etc/bareos | ||
RUN mkdir /run/bareos \ | ||
&& chown bareos /run/bareos | ||
|
||
COPY webhook-notify /usr/local/bin/webhook-notify | ||
RUN chmod u+x /usr/local/bin/webhook-notify | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod u+x /docker-entrypoint.sh | ||
|
||
EXPOSE 9101 | ||
|
||
VOLUME /etc/bareos | ||
VOLUME /var/lib/bareos | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["/usr/sbin/bareos-dir", "-u", "bareos", "-f"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.