Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webservice
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
masi9606
webservice
Commits
ef493223
Commit
ef493223
authored
6 months ago
by
schnarkus
Browse files
Options
Downloads
Patches
Plain Diff
use redis inside the dev container
parent
10db23c6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#68967
passed
6 months ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
local-environment/redis.sh
+0
-24
0 additions, 24 deletions
local-environment/redis.sh
local-environment/setup-local.sh
+7
-1
7 additions, 1 deletion
local-environment/setup-local.sh
with
7 additions
and
25 deletions
local-environment/redis.sh
deleted
100755 → 0
+
0
−
24
View file @
10db23c6
#!/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
\
-p
$REDIS_PORT
:
$REDIS_PORT
\
--name
$REDIS_CONTAINER_NAME
\
redis redis-server
--save
60 1
--loglevel
warning
echo
"Redis setup complete..."
#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
#KEYS *
\ No newline at end of file
This diff is collapsed.
Click to expand it.
local-environment/setup-local.sh
+
7
−
1
View file @
ef493223
...
...
@@ -46,4 +46,10 @@ podman exec -it $CONTAINER_NAME curl -k https://$DOMAIN_NAME:$CONTAINER_HTTPS_PO
echo
"Testing from outside..."
sudo
bash
-c
"echo '127.0.0.1 webservice.local' >> /etc/hosts"
curl
-k
https://
$DOMAIN_NAME
:
$CONTAINER_HTTPS_PORT
/
\ No newline at end of file
curl
-k
https://
$DOMAIN_NAME
:
$CONTAINER_HTTPS_PORT
/
echo
"Testing Redis..."
curl
-k
-X
PUT
--header
'Content-Type: text/plain; charset=utf-8'
--data
'foo'
https://
$DOMAIN_NAME
:
$CONTAINER_HTTPS_PORT
/state/bar
# Check the value in the database
podman
exec
-it
$CONTAINER_NAME
redis-cli KEYS
'*'
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment