Skip to content
Snippets Groups Projects
Commit 1a61857f authored by schnarkus's avatar schnarkus
Browse files

set up redis dev

parent 97db77d6
No related branches found
No related tags found
No related merge requests found
Pipeline #68924 failed
...@@ -3,3 +3,4 @@ artifact.bin ...@@ -3,3 +3,4 @@ artifact.bin
*terraform* *terraform*
.ssh .ssh
kubectl* kubectl*
db_pass
...@@ -3,13 +3,18 @@ ...@@ -3,13 +3,18 @@
FROM ubuntu:22.04 FROM ubuntu:22.04
COPY artifact.bin /artifact.bin COPY artifact.bin /artifact.bin
COPY db_pass /db_pass
# Set more environment variables for the web service # Set more environment variables for the web service
ENV VERSION=1.0.0
ENV FONT_COLOR=blue
ENV HOST=0.0.0.0 ENV HOST=0.0.0.0
ENV PORT=8080 ENV PORT=8080
ENV DB_HOST=localhost ENV DB_HOST=localhost
ENV DB_PORT=6379
ENV DB_NAME=0
ENV DB_PASSWORD=/db_pass
ENV FONT_COLOR=blue
EXPOSE 8080 EXPOSE 8080
......
...@@ -13,15 +13,13 @@ podman pull redis-server ...@@ -13,15 +13,13 @@ podman pull redis-server
# Run Redis container with persistent storage # Run Redis container with persistent storage
podman run -d \ podman run -d \
-v ./redis/data:/usr/local/etc/redis \ -v ./redis/conf:/usr/local/etc/redis \
-p $REDIS_PORT:$REDIS_PORT \ -p $REDIS_PORT:$REDIS_PORT \
--name $REDIS_CONTAINER_NAME \ --name $REDIS_CONTAINER_NAME \
redis redis-server --save 60 1 --loglevel warning redis redis-server --save 60 1 --loglevel warning
echo "Redis setup complete..." echo "Redis setup complete..."
#Look inside #curl -X PUT --header 'Content-Type: text/plain; charset=utf-8' --data 'foo' http://localhost:8080/state/bar
#podman exec -it redis_container redis-cli #podman exec -it redis_container redis-cli
#KEYS * #KEYS *
#GET state:bar \ No newline at end of file
#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