# redis docker

`.env`

```
# .env
REDIS_DATA_PATH=./redis/data
REDIS_DEFAULT_CONFIG_FILE=./redis/conf/redis.conf
REDIS_BINDING_PORT=6389
REDIS_PORT=6379
```

`docker-compose.yml`

```yaml
version: '3.8'
services:
  redis: # container name
    image: redis:6.2.6-alpine
    ports: # 바인딩할 포트:내부 포트
      - ${REDIS_BINDING_PORT}:${REDIS_PORT}
    command: redis-server /usr/local/etc/redis/redis.conf
    volumes: # 마운트할 볼륨 설정
      - ${REDIS_DATA_PATH}:/data
      - ${REDIS_DEFAULT_CONFIG_FILE}:/usr/local/etc/redis/redis.conf
    restart: always
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://programmer-jjy.gitbook.io/second-brain/cheat-sheet/project-getting-started/redis-docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
