Skip to content
Snippets Groups Projects
Commit 9056aa49 authored by schnarkus's avatar schnarkus
Browse files

prepare redis dev

parent 373a0c11
No related branches found
No related tags found
No related merge requests found
Pipeline #68919 passed
......@@ -4,8 +4,19 @@ FROM ubuntu:22.04
COPY artifact.bin /artifact.bin
# Set more environment variables for the web service
ENV VERSION=1.0.0
ENV FONT_COLOR=blue
ENV LOG_LEVE=error
ENV ENV_NAME=development
ENV HOST=0.0.0.0
ENV PORT=8080
ENV DB_HOST=redis_container
ENV DB_PORT=6379
ENV DB_NAME=0
ENV DB_USERNAME=
ENV DB_PASSWORD=
EXPOSE 8080
CMD ["/artifact.bin"]
#!/bin/bash
REDIS_CONTAINER_NAME="redis_container"
REDIS_PORT="6379"
# Stop and remove old Redis container
podman stop $REDIS_CONTAINER_NAME
podman rm -f $REDIS_CONTAINER_NAME
# Pull Redis images
podman pull redis
podman pull redis-server
# Run Redis container with persistent storage
podman run -d \
-v ./redis/data:/usr/local/etc/redis \
-p $REDIS_PORT:$REDIS_PORT \
--name $REDIS_CONTAINER_NAME \
redis redis-server --save 60 1 --loglevel warning
echo "Redis setup complete..."
#Look inside
#podman exec -it redis_container redis-cli
#KEYS *
#GET state:bar
#KEYS state:*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment