mirror of
https://github.com/eftechcombr/bacula.git
synced 2025-04-19 08:25:09 +00:00
Merge pull request #13 from eftechcombr/11-errors-in-sudo-for-baculum
11 errors in sudo for baculum
This commit is contained in:
commit
7ace631b06
@ -21,7 +21,7 @@ env:
|
|||||||
REGISTRY: "docker.io"
|
REGISTRY: "docker.io"
|
||||||
# github.repository as <account>/<repo>
|
# github.repository as <account>/<repo>
|
||||||
IMAGE_NAME: eftechcombr/baculum
|
IMAGE_NAME: eftechcombr/baculum
|
||||||
VERSION: "11.0.6"
|
VERSION: "15.0.2"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,17 +6,20 @@ COPY baculum.list /etc/apt/sources.list.d/baculum.list
|
|||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
apt -y install \
|
apt -y install \
|
||||||
php-bcmath \
|
php-bcmath \
|
||||||
php*-mbstring \
|
php*-mbstring \
|
||||||
php-fpm \
|
php-fpm \
|
||||||
baculum-api \
|
|
||||||
baculum-api-apache2 \
|
|
||||||
baculum-common \
|
baculum-common \
|
||||||
bacula-console \
|
bacula-console \
|
||||||
baculum-web \
|
baculum-api \
|
||||||
baculum-web-apache2 \
|
baculum-api-apache2 \
|
||||||
supervisor
|
supervisor
|
||||||
|
|
||||||
|
RUN curl -OL https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/archive/Branch-15.0/bacula-community-Branch-15.0.tar.gz \
|
||||||
|
&& tar zxf bacula-community-Branch-15.0.tar.gz \
|
||||||
|
&& cd bacula-community-Branch-15.0/gui/baculum/ \
|
||||||
|
&& cp -Rf index.php assets protected themes /usr/share/baculum/htdocs/ || echo ok
|
||||||
|
|
||||||
COPY sudoers-baculum /etc/sudoers.d/sudoers-baculum
|
COPY sudoers-baculum /etc/sudoers.d/sudoers-baculum
|
||||||
|
|
||||||
RUN usermod -aG bacula www-data && \
|
RUN usermod -aG bacula www-data && \
|
||||||
@ -35,5 +38,7 @@ EXPOSE 9096/tcp
|
|||||||
|
|
||||||
RUN mkdir -p /run/php
|
RUN mkdir -p /run/php
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord"]
|
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||||
|
|
||||||
|
# CMD ["/usr/bin/supervisord"]
|
||||||
|
# CMD ["sleep", "50000"]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Defaults:apache "'!'"requiretty
|
Defaults:www-data "'!'"requiretty
|
||||||
www-data ALL=NOPASSWD: /usr/sbin/bconsole
|
www-data ALL=NOPASSWD: /usr/sbin/bconsole
|
||||||
www-data ALL=NOPASSWD: /usr/sbin/bdirjson
|
www-data ALL=NOPASSWD: /usr/sbin/bdirjson
|
||||||
www-data ALL=NOPASSWD: /usr/sbin/bsdjson
|
www-data ALL=NOPASSWD: /usr/sbin/bsdjson
|
||||||
|
@ -6,18 +6,21 @@ COPY baculum.list /etc/apt/sources.list.d/baculum.list
|
|||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
apt -y install \
|
apt -y install \
|
||||||
php-bcmath \
|
php-bcmath \
|
||||||
php*-mbstring \
|
php*-mbstring \
|
||||||
php-fpm \
|
php-fpm \
|
||||||
libapache2-mod-php \
|
libapache2-mod-php \
|
||||||
baculum-api \
|
|
||||||
baculum-api-apache2 \
|
|
||||||
baculum-common \
|
|
||||||
bacula-console \
|
bacula-console \
|
||||||
baculum-web \
|
baculum-common \
|
||||||
|
baculum-web \
|
||||||
baculum-web-apache2 \
|
baculum-web-apache2 \
|
||||||
supervisor
|
supervisor
|
||||||
|
|
||||||
|
RUN curl -OL https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/archive/Branch-15.0/bacula-community-Branch-15.0.tar.gz \
|
||||||
|
&& tar zxf bacula-community-Branch-15.0.tar.gz \
|
||||||
|
&& cd bacula-community-Branch-15.0/gui/baculum/ \
|
||||||
|
&& cp -Rf index.php assets protected themes /usr/share/baculum/htdocs/ || echo ok
|
||||||
|
|
||||||
COPY sudoers-baculum /etc/sudoers.d/sudoers-baculum
|
COPY sudoers-baculum /etc/sudoers.d/sudoers-baculum
|
||||||
|
|
||||||
RUN usermod -aG bacula www-data && \
|
RUN usermod -aG bacula www-data && \
|
||||||
@ -39,4 +42,7 @@ RUN mkdir -p /run/php
|
|||||||
|
|
||||||
# RUN yum -y clean all && rm -rf /var/cache/yum
|
# RUN yum -y clean all && rm -rf /var/cache/yum
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord"]
|
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||||
|
|
||||||
|
# CMD ["/usr/bin/supervisord"]
|
||||||
|
# CMD ["sleep", "50000"]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Defaults:apache "'!'"requiretty
|
Defaults:www-data "'!'"requiretty
|
||||||
www-data ALL=NOPASSWD: /usr/sbin/bconsole
|
www-data ALL=NOPASSWD: /usr/sbin/bconsole
|
||||||
www-data ALL=NOPASSWD: /usr/sbin/bdirjson
|
www-data ALL=NOPASSWD: /usr/sbin/bdirjson
|
||||||
www-data ALL=NOPASSWD: /usr/sbin/bsdjson
|
www-data ALL=NOPASSWD: /usr/sbin/bsdjson
|
||||||
|
@ -97,7 +97,7 @@ services:
|
|||||||
#
|
#
|
||||||
baculum-api:
|
baculum-api:
|
||||||
build: baculum-api/
|
build: baculum-api/
|
||||||
image: eftechcombr/baculum:11.0.6-api
|
image: eftechcombr/baculum:15.0.2-api
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -110,7 +110,7 @@ services:
|
|||||||
#
|
#
|
||||||
baculum-web:
|
baculum-web:
|
||||||
build: baculum-web/
|
build: baculum-web/
|
||||||
image: eftechcombr/baculum:11.0.6-web
|
image: eftechcombr/baculum:15.0.2-web
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- baculum-api
|
- baculum-api
|
||||||
|
@ -46,7 +46,7 @@ services:
|
|||||||
- 9102:9102
|
- 9102:9102
|
||||||
|
|
||||||
baculum-api:
|
baculum-api:
|
||||||
image: eftechcombr/baculum:11.0.6-api
|
image: eftechcombr/baculum:15.0.2-api
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -59,7 +59,7 @@ services:
|
|||||||
|
|
||||||
#
|
#
|
||||||
baculum-web:
|
baculum-web:
|
||||||
image: eftechcombr/baculum:11.0.6-web
|
image: eftechcombr/baculum:15.0.2-web
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- baculum-api
|
- baculum-api
|
||||||
|
0
docker/etc/baculum/Config-api-apache/baculum.users
Executable file → Normal file
0
docker/etc/baculum/Config-api-apache/baculum.users
Executable file → Normal file
1
docker/etc/baculum/Config-api-lighttpd/baculum.users
Normal file
1
docker/etc/baculum/Config-api-lighttpd/baculum.users
Normal file
@ -0,0 +1 @@
|
|||||||
|
admin:YWG41BPzVAkN6
|
0
docker/etc/baculum/Config-web-apache/baculum.users
Executable file → Normal file
0
docker/etc/baculum/Config-web-apache/baculum.users
Executable file → Normal file
1
docker/etc/baculum/Config-web-lighttpd/baculum.users
Normal file
1
docker/etc/baculum/Config-web-lighttpd/baculum.users
Normal file
@ -0,0 +1 @@
|
|||||||
|
admin:YWG41BPzVAkN6
|
108
docker/etc/baculum/baculum-api-lighttpd.conf
Normal file
108
docker/etc/baculum/baculum-api-lighttpd.conf
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
# Baculum WebGUI tool for Bacula Community
|
||||||
|
#
|
||||||
|
# Web Server Configuration
|
||||||
|
#
|
||||||
|
|
||||||
|
server.port = 9096
|
||||||
|
server.username = "www-data"
|
||||||
|
server.groupname = "www-data"
|
||||||
|
server.document-root = "/usr/share/baculum/htdocs"
|
||||||
|
server.errorlog = "/var/log/lighttpd/baculum-api-error.log"
|
||||||
|
accesslog.filename = "/var/log/lighttpd/baculum-api-access.log"
|
||||||
|
server.pid-file = "/var/run/baculum-api.pid"
|
||||||
|
|
||||||
|
#
|
||||||
|
# NOTE: To enable encrypted connection please prepare cert files and
|
||||||
|
# then uncomment SSL lines below
|
||||||
|
#
|
||||||
|
#ssl.engine = "enable"
|
||||||
|
#ssl.pemfile = "/etc/baculum/Config-api-lighttpd/baculum.pem"
|
||||||
|
#ssl.ca-file = "/etc/baculum/Config-api-lighttpd/baculum.crt"
|
||||||
|
|
||||||
|
server.modules = (
|
||||||
|
"mod_auth",
|
||||||
|
"mod_alias",
|
||||||
|
"mod_rewrite",
|
||||||
|
"mod_setenv",
|
||||||
|
"mod_fastcgi",
|
||||||
|
"mod_access",
|
||||||
|
"mod_accesslog"
|
||||||
|
)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Uncomment this line and closing braces below when you use OAuth2
|
||||||
|
#
|
||||||
|
#$HTTP["url"] =~ "^/panel.*$" {
|
||||||
|
auth.backend = "htpasswd"
|
||||||
|
auth.backend.htpasswd.userfile = "/usr/share/baculum/htdocs/protected/API/Config/baculum.users"
|
||||||
|
auth.require = ( "/" => (
|
||||||
|
"method" => "basic",
|
||||||
|
"realm" => "Baculum Auth",
|
||||||
|
"require" => "valid-user"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
#}
|
||||||
|
|
||||||
|
index-file.names = ( "index.php" )
|
||||||
|
|
||||||
|
static-file.exclude-extensions = ( ".php" )
|
||||||
|
|
||||||
|
dir-listing.encoding = "utf-8"
|
||||||
|
|
||||||
|
mimetype.assign = (
|
||||||
|
".html" => "text/html",
|
||||||
|
".gif" => "image/gif",
|
||||||
|
".png" => "image/png",
|
||||||
|
".ico" => "image/x-icon",
|
||||||
|
".css" => "text/css",
|
||||||
|
".js" => "application/javascript"
|
||||||
|
)
|
||||||
|
|
||||||
|
alias.url = (
|
||||||
|
"/" => "/usr/share/baculum/htdocs/"
|
||||||
|
)
|
||||||
|
|
||||||
|
fastcgi.server = (
|
||||||
|
".php"=> (
|
||||||
|
(
|
||||||
|
"bin-path"=>"/usr/bin/php-cgi",
|
||||||
|
"socket"=>"/tmp/php.sock",
|
||||||
|
"max-procs" => 1,
|
||||||
|
"bin-environment" => (
|
||||||
|
"PHP_FCGI_CHILDREN" => "4",
|
||||||
|
"PHP_FCGI_MAX_REQUESTS" => "10000"
|
||||||
|
),
|
||||||
|
"bin-copy-environment" => (
|
||||||
|
"PATH",
|
||||||
|
"SHELL",
|
||||||
|
"USER"
|
||||||
|
),
|
||||||
|
"broken-scriptfilename" => "enable"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
url.rewrite-once = (
|
||||||
|
"^/themes/(.+)$" => "/themes/$1",
|
||||||
|
"^/assets/(.+)$" => "/assets/$1",
|
||||||
|
"^/((index\.php)?\?.+)?$" => "/index.php/panel/",
|
||||||
|
"^/api/page" => "/index.php/panel/",
|
||||||
|
"^/(.+)$" => "/index.php/$1"
|
||||||
|
)
|
||||||
|
|
||||||
|
url.access-deny = (
|
||||||
|
"^/usr/share/baculum/htdocs/protected/"
|
||||||
|
)
|
||||||
|
|
||||||
|
### Enable compressing dynamic content ###
|
||||||
|
|
||||||
|
# disable mod_compress when request a php file
|
||||||
|
$HTTP["url"] !~ "\.php$" {
|
||||||
|
compress.filetype = (
|
||||||
|
"text/plain",
|
||||||
|
"text/html",
|
||||||
|
"text/javascript",
|
||||||
|
"text/css",
|
||||||
|
"text/xml"
|
||||||
|
)
|
||||||
|
}
|
104
docker/etc/baculum/baculum-web-lighttpd.conf
Normal file
104
docker/etc/baculum/baculum-web-lighttpd.conf
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
# Baculum WebGUI tool for Bacula Community
|
||||||
|
#
|
||||||
|
# Web Server Configuration
|
||||||
|
#
|
||||||
|
|
||||||
|
server.port = 9095
|
||||||
|
server.username = "www-data"
|
||||||
|
server.groupname = "www-data"
|
||||||
|
server.document-root = "/usr/share/baculum/htdocs"
|
||||||
|
server.errorlog = "/var/log/lighttpd/baculum-web-error.log"
|
||||||
|
accesslog.filename = "/var/log/lighttpd/baculum-web-access.log"
|
||||||
|
server.pid-file = "/var/run/baculum-web.pid"
|
||||||
|
|
||||||
|
#
|
||||||
|
# NOTE: To enable encrypted connection please prepare cert files and
|
||||||
|
# then uncomment SSL lines below
|
||||||
|
#
|
||||||
|
#ssl.engine = "enable"
|
||||||
|
#ssl.pemfile = "/etc/baculum/Config-web-lighttpd/baculum.pem"
|
||||||
|
#ssl.ca-file = "/etc/baculum/Config-web-lighttpd/baculum.crt"
|
||||||
|
|
||||||
|
server.modules = (
|
||||||
|
"mod_auth",
|
||||||
|
"mod_alias",
|
||||||
|
"mod_rewrite",
|
||||||
|
"mod_setenv",
|
||||||
|
"mod_fastcgi",
|
||||||
|
"mod_access",
|
||||||
|
"mod_accesslog"
|
||||||
|
)
|
||||||
|
|
||||||
|
$HTTP["url"] !~ "/web/redirect$" {
|
||||||
|
auth.backend = "htpasswd"
|
||||||
|
auth.backend.htpasswd.userfile = "/usr/share/baculum/htdocs/protected/Web/Config/baculum.users"
|
||||||
|
auth.require = ( "" => (
|
||||||
|
"method" => "basic",
|
||||||
|
"realm" => "Baculum Auth",
|
||||||
|
"require" => "valid-user"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
index-file.names = ( "index.php" )
|
||||||
|
|
||||||
|
static-file.exclude-extensions = ( ".php" )
|
||||||
|
|
||||||
|
dir-listing.encoding = "utf-8"
|
||||||
|
|
||||||
|
mimetype.assign = (
|
||||||
|
".html" => "text/html",
|
||||||
|
".gif" => "image/gif",
|
||||||
|
".png" => "image/png",
|
||||||
|
".ico" => "image/x-icon",
|
||||||
|
".css" => "text/css",
|
||||||
|
".js" => "application/javascript"
|
||||||
|
)
|
||||||
|
|
||||||
|
alias.url = (
|
||||||
|
"/" => "/usr/share/baculum/htdocs/"
|
||||||
|
)
|
||||||
|
|
||||||
|
fastcgi.server = (
|
||||||
|
".php"=> (
|
||||||
|
(
|
||||||
|
"bin-path"=>"/usr/bin/php-cgi",
|
||||||
|
"socket"=>"/tmp/php.sock",
|
||||||
|
"max-procs" => 1,
|
||||||
|
"bin-environment" => (
|
||||||
|
"PHP_FCGI_CHILDREN" => "4",
|
||||||
|
"PHP_FCGI_MAX_REQUESTS" => "10000"
|
||||||
|
),
|
||||||
|
"bin-copy-environment" => (
|
||||||
|
"PATH",
|
||||||
|
"SHELL",
|
||||||
|
"USER"
|
||||||
|
),
|
||||||
|
"broken-scriptfilename" => "enable"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
url.rewrite-once = (
|
||||||
|
"^/themes/(.+)$" => "/themes/$1",
|
||||||
|
"^/assets/(.+)$" => "/assets/$1",
|
||||||
|
"^/$" => "/index.php/web",
|
||||||
|
"^/(.+)$" => "/index.php/$1"
|
||||||
|
)
|
||||||
|
|
||||||
|
url.access-deny = (
|
||||||
|
"^/usr/share/baculum/htdocs/protected/"
|
||||||
|
)
|
||||||
|
|
||||||
|
### Enable compressing dynamic content ###
|
||||||
|
|
||||||
|
# disable mod_compress when request a php file
|
||||||
|
$HTTP["url"] !~ "\.php$" {
|
||||||
|
compress.filetype = (
|
||||||
|
"text/plain",
|
||||||
|
"text/html",
|
||||||
|
"text/javascript",
|
||||||
|
"text/css",
|
||||||
|
"text/xml"
|
||||||
|
)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user