FROM fraunhoferiosb/frost-server-http:2.6.1

ENV http_cors_enable=true
ENV http_cors_allowed_origins=*

ENV persistence_autoUpdateDatabase=true
ENV defaultTop=2000
ENV maxTop=10000
ENV auth_provider=de.fraunhofer.iosb.ilt.frostserver.auth.basic.BasicAuthProvider
ENV auth_allowAnonymousRead=false
ENV auth_autoUpdateDatabase=true
ENV auth_realmName=gdi-frost
ENV auth_plainTextPassword=true

ENV persistence_db_jndi_datasource=jdbc/sensorThings
ENV auth_db_jndi_datasource=jdbc/sensorThings


COPY container/frost/context.xml $CATALINA_HOME/conf/
COPY container/frost/entrypoint.sh /etc/entrypoint.sh

USER root

CMD ["sh", "/etc/entrypoint.sh"]