Skip to content

Commit

Permalink
chore(Solr): Added custom managed_schema for solr image
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Sep 25, 2023
1 parent 3ae0379 commit 8e794bd
Show file tree
Hide file tree
Showing 4 changed files with 1,053 additions and 3 deletions.
Empty file removed .data/solr/.gitkeep
Empty file.
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ services:
ports:
- "${PUBLIC_SOLR_PORT}:8983/tcp"
volumes:
- "./.data/solr:/var/solr:delegated"
- "solr_data:/var/solr:delegated"
environment:
SOLR_UID: ${USER_UID}
SOLR_GID: ${USER_UID}
Expand Down Expand Up @@ -230,3 +230,6 @@ networks:
driver: default
config:
- subnet: ${DEFAULT_GATEWAY}/16

volumes:
solr_data:
8 changes: 6 additions & 2 deletions docker/solr/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
FROM solr:8-slim
MAINTAINER Ambroise Maupate <[email protected]>

ARG USER_UID=1000
ARG USER_UID=8983

USER root
RUN set -ex; \
echo "USER_UID: ${USER_UID}\n"; \
usermod -u ${USER_UID} "$SOLR_USER"; \
groupmod -g ${USER_UID} "$SOLR_GROUP";
groupmod -g ${USER_UID} "$SOLR_GROUP"; \
chown -R ${USER_UID}:${USER_UID} /var/solr;

COPY managed-schema.xml /opt/solr/server/solr/configsets/_default/conf/managed-schema

USER $SOLR_USER
Loading

0 comments on commit 8e794bd

Please sign in to comment.