Skip to content

Commit

Permalink
add constant for redis user
Browse files Browse the repository at this point in the history
  • Loading branch information
reneradoi committed Jun 7, 2024
1 parent eee676a commit 426d05e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
PEER_PASSWORD_KEY,
REDIS_PORT,
REDIS_REL_NAME,
REDIS_USER,
SENTINEL_PASSWORD_KEY,
SOCKET_TIMEOUT,
WAITING_MESSAGE,
Expand Down Expand Up @@ -332,8 +333,8 @@ def _update_layer(self) -> None:
LOG_DIR,
make_parents=True,
permissions=0o770,
user="redis",
group="redis",
user=REDIS_USER,
group=REDIS_USER,
)

if not self._valid_app_databag():
Expand Down
2 changes: 2 additions & 0 deletions src/literals.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
SOCKET_TIMEOUT = 1

REDIS_PORT = 6379
REDIS_USER = "redis"
SENTINEL_PORT = 26379
METRICS_PORT = 9121

LOG_DIR = "/var/log/redis"
LOG_FILE = f"{LOG_DIR}/redis-server.log"
Expand Down

0 comments on commit 426d05e

Please sign in to comment.