Skip to content

Commit

Permalink
proper redis volume mount for ubi
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmelt committed Dec 15, 2023
1 parent b3e3897 commit a6dd6fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ services:
user: "${OPENC3_USER_ID:-1001}:${OPENC3_GROUP_ID:-1001}"
image: "${OPENC3_REGISTRY}/${OPENC3_NAMESPACE}/openc3-redis${OPENC3_IMAGE_SUFFIX}:${OPENC3_TAG}"
volumes:
- "openc3-redis-v:/data"
- "openc3-redis-v:${OPENC3_REDIS_VOLUME:-/data}"
- "./cacert.pem:/devel/cacert.pem:z"
- "./openc3-redis/users.acl:/config/users.acl:z"
restart: "unless-stopped"
Expand All @@ -78,7 +78,7 @@ services:
user: "${OPENC3_USER_ID:-1001}:${OPENC3_GROUP_ID:-1001}"
image: "${OPENC3_REGISTRY}/${OPENC3_NAMESPACE}/openc3-redis${OPENC3_IMAGE_SUFFIX}:${OPENC3_TAG}"
volumes:
- "openc3-redis-ephemeral-v:/data"
- "openc3-redis-ephemeral-v:${OPENC3_REDIS_VOLUME:-/data}"
- "./cacert.pem:/devel/cacert.pem:z"
- "./openc3-redis/users.acl:/config/users.acl:z"
restart: "unless-stopped"
Expand Down
2 changes: 2 additions & 0 deletions openc3-redis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ COPY --chmod=0755 ./docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh

RUN mkdir -p /data && chown 1001:1001 /data
RUN ["chmod", "-R", "777", "/data/"]
RUN mkdir -p /home/data && chown 1001:1001 /home/data
RUN ["chmod", "-R", "777", "/home/data/"]

EXPOSE 3680
USER 1001
Expand Down
2 changes: 1 addition & 1 deletion openc3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ case $1 in
${DOCKER_COMPOSE_COMMAND} -f compose.yaml up -d
;;
run-ubi )
OPENC3_IMAGE_SUFFIX=-ubi ${DOCKER_COMPOSE_COMMAND} -f compose.yaml up -d
OPENC3_IMAGE_SUFFIX=-ubi OPENC3_REDIS_VOLUME=/home/data ${DOCKER_COMPOSE_COMMAND} -f compose.yaml up -d
;;
dev )
${DOCKER_COMPOSE_COMMAND} -f compose.yaml -f compose-dev.yaml up -d
Expand Down

0 comments on commit a6dd6fc

Please sign in to comment.