1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-06 21:48:12 -05:00
bitwarden/util/Nginx/Dockerfile
2025-03-13 11:35:12 -07:00

30 lines
759 B
Docker

FROM --platform=$BUILDPLATFORM nginx:stable
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gosu \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY util/Nginx/nginx.conf /etc/nginx
COPY util/Nginx/proxy.conf /etc/nginx
COPY util/Nginx/mime.types /etc/nginx
COPY util/Nginx/security-headers.conf /etc/nginx
COPY util/Nginx/security-headers-ssl.conf /etc/nginx
COPY util/Nginx/logrotate.sh /
COPY util/Nginx/entrypoint.sh /
EXPOSE 8080
EXPOSE 8443
RUN chmod +x /entrypoint.sh \
&& chmod +x /logrotate.sh
HEALTHCHECK CMD curl --insecure -Lfs https://localhost:8443/alive || curl -Lfs http://localhost:8080/alive || exit 1
ENTRYPOINT ["/entrypoint.sh"]