Skip to content

Commit

Permalink
Setup redis when using workers to always use a unix socket
Browse files Browse the repository at this point in the history
  • Loading branch information
realtyem committed Jul 10, 2023
1 parent 4d3afab commit 4e96bc4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- uses: dorny/paths-filter@v2
if: |
github.event_name == 'push' ||
github.event.inputs.branch != 'custom'
github.event_name == 'schedule'
id: changes
with:
filters: |
Expand Down Expand Up @@ -93,12 +93,13 @@ jobs:
- name: Grab Context
env:
EVENT_CONTEXT: ${{ toJSON(github) }}
STEPS_CONTEXT: ${{ toJSON(steps) }}
run: |
echo $EVENT_CONTEXT
- name: Grab Github ENV outputs
run: |
echo $GITHUB_OUTPUT
echo ${GITHUB_OUTPUT}
- name: Set up Docker Buildx
id: buildx
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile-unified
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,10 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
libwebp6 \
nano \
openssl \
redis-tools \
xmlsec1 \
&& rm -rf /var/lib/apt/lists/*

# COPY --from=builder /install /usr/local

# Prepare directories. Do it in one layer
RUN mkdir -p /etc/supervisor/conf.d && \
mkdir /var/log/nginx /var/lib/nginx && \
Expand Down
1 change: 1 addition & 0 deletions conf-workers/shared.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{# Although this feels bare, all the defaults for host and port are exactly right. #}
redis:
enabled: true
path: /dev/shm/redis.sock
{% endif %}

{% if appservice_registrations is not none %}
Expand Down
2 changes: 1 addition & 1 deletion conf-workers/supervisord.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ username=www-data
autorestart=true

[program:redis]
command=/usr/local/bin/prefix-log /usr/local/bin/redis-server
command=/usr/local/bin/prefix-log /usr/local/bin/redis-server --unixsocket /dev/shm/redis.sock --io-threads 4
priority=1
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
Expand Down

0 comments on commit 4e96bc4

Please sign in to comment.