FROM quay.io/openbao/openbao:2.5.0

LABEL maintainer="Mosaic Stack <dev@mosaic.local>"
LABEL description="OpenBao secrets management for Mosaic Stack"

# Copy OpenBao configuration
COPY config.hcl /openbao/config/config.hcl

# Copy auto-initialization script
COPY init.sh /openbao/init.sh
RUN chmod +x /openbao/init.sh

# Expose OpenBao port
EXPOSE 8200

# Use the default entrypoint from the base image
# The container will be started with either:
# - Default: openbao server -config=/openbao/config/config.hcl
# - Init sidecar: /openbao/init.sh
