Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/DSAV-Dodeka/dodeka
Browse files Browse the repository at this point in the history
  • Loading branch information
tiptenbrink committed Nov 28, 2023
2 parents 1ccbfd9 + e310532 commit 74af50a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
4 changes: 3 additions & 1 deletion build/container/kv/confspawn_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ FROM redis:7.2-bookworm
ADD redis.conf {{ kv.redis_conf_dir }}
# loadmodule in conf is done on startup
COPY librejson.so /rejson/librejson.so
CMD [ "redis-server", "{{ kv.redis_conf_dir }}" ]
ADD command.sh /command.sh
WORKDIR /
CMD [ "./command.sh", "$REDIS_PASSWORD" ]
9 changes: 9 additions & 0 deletions build/container/kv/confspawn_command.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#/bin/sh

# Check if the $HI variable is set
if [ -n "$REDIS_PASSWORD" ]; then
redis-server {{ kv.redis_conf_dir }} --requirepass "$REDIS_PASSWORD"
else
echo "Error: \$REDIS_PASSWORD must be set!"
exit 1
fi
3 changes: 2 additions & 1 deletion build/deploy/compose/confspawn_docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ services:
{{ kv.service_name }}:
profiles: [ "data", "all" ]
image: "${KV_IMAGE}:${KV_VERSION}"
environment:
- REDIS_PASSWORD
ports:
- "${KV_HOST_HOST}:${KV_HOST_PORT}:{{ kv.container_port }}"
command: /bin/sh -c "redis-server {{ kv.redis_conf_dir }} --requirepass ${REDIS_PASSWORD}"
restart: {{ confspawn_env.restart }}
{{ server.service_name }}:
profiles: [ "all" ]
Expand Down
3 changes: 2 additions & 1 deletion use/dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ services:
kv:
profiles: [ "data", "all" ]
image: "${KV_IMAGE}:${KV_VERSION}"
environment:
- REDIS_PASSWORD
ports:
- "${KV_HOST_HOST}:${KV_HOST_PORT}:6379"
command: /bin/sh -c "redis-server /usr/local/etc/redis/redis.conf --requirepass ${REDIS_PASSWORD}"
restart: "no"
server:
profiles: [ "all" ]
Expand Down
3 changes: 2 additions & 1 deletion use/production/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ services:
kv:
profiles: [ "data", "all" ]
image: "${KV_IMAGE}:${KV_VERSION}"
environment:
- REDIS_PASSWORD
ports:
- "${KV_HOST_HOST}:${KV_HOST_PORT}:6379"
command: /bin/sh -c "redis-server /usr/local/etc/redis/redis.conf --requirepass ${REDIS_PASSWORD}"
restart: always
server:
profiles: [ "all" ]
Expand Down
3 changes: 2 additions & 1 deletion use/staging/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ services:
kv:
profiles: [ "data", "all" ]
image: "${KV_IMAGE}:${KV_VERSION}"
environment:
- REDIS_PASSWORD
ports:
- "${KV_HOST_HOST}:${KV_HOST_PORT}:6379"
command: /bin/sh -c "redis-server /usr/local/etc/redis/redis.conf --requirepass ${REDIS_PASSWORD}"
restart: always
server:
profiles: [ "all" ]
Expand Down

0 comments on commit 74af50a

Please sign in to comment.