Commit 366ef398 authored by Felix Bartels's avatar Felix Bartels

initial ldap config for admin page

Signed-off-by: Felix Bartels's avatarFelix Bartels <felix@host-consultants.de>
parent 1eb0c594
......@@ -5,8 +5,8 @@
"description": "file://DESCRIPTION.md",
"changelog": "file://CHANGELOG",
"tagline": "Rust implementation of the Bitwarden API",
"version": "0.1.0",
"healthCheckPath": "/",
"version": "0.1.1",
"healthCheckPath": "/healthcheck",
"httpPort": 80,
"addons": {
"localstorage": {},
......
......@@ -5,19 +5,30 @@ ENV ROCKET_PORT=3000
ENV ROCKET_WORKERS=10
ENV DATA_FOLDER=/app/data
ENV SIGNUPS_ALLOWED=false
ENV DISABLE_ADMIN_TOKEN=true
ENV WEBSOCKET_ENABLED=false
# set to false, will need some apacje config first
RUN mkdir -p /app/data
VOLUME /app/data
EXPOSE 80
EXPOSE 3012
# configure apache
RUN rm /etc/apache2/sites-enabled/*
RUN sed -e 's,^ErrorLog.*,ErrorLog "|/bin/cat",' -i /etc/apache2/apache2.conf
RUN a2disconf other-vhosts-access-log
ADD apache.conf /etc/apache2/sites-enabled/bitwarden.conf
RUN a2enmod ldap authnz_ldap proxy proxy_http rewrite
# Copies the files from the context (Rocket.toml file and web-vault)
# and the binary from the "build" stage to the current stage
COPY --from=mprasil/bitwarden:1.8.0 /web-vault /app/code/web-vault
COPY --from=mprasil/bitwarden:1.8.0 /bitwarden_rs /app/code/
COPY --from=mprasil/bitwarden:1.8.0 /Rocket.toml /app/code/
WORKDIR /app/code
ADD apache.conf /etc/apache2/sites-enabled/bitwarden.conf
RUN a2enmod ldap authnz_ldap proxy proxy_http rewrite
ADD start.sh /app/code/start.sh
CMD [ "/app/code/start.sh" ]
......@@ -4,11 +4,7 @@
ErrorLog "/dev/stderr"
CustomLog "/dev/stdout" combined
<Location /admin>
AllowOverride None
Order deny,allow
Deny from All
<Location />
ProxyPreserveHost On
ProxyErrorOverride Off
ProxyPass http://127.0.0.1:3000/
......@@ -30,7 +26,7 @@
ProxyPreserveHost On
ProxyErrorOverride Off
ProxyPass http://127.0.0.1:3000/
ProxyPass http://127.0.0.1:3000/admin/
</Location>
<Location /healthcheck>
......
......@@ -2,6 +2,8 @@
set -eu
export DOMAIN=$APP_ORIGIN
echo "=> Starting apache"
APACHE_CONFDIR="" source /etc/apache2/envvars
rm -f "${APACHE_PID_FILE}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment