mirror of https://github.com/peter4431/rq.git
Fix RQScheduler when run with SSL connection (#1383)
* Quick and dirty set up of SSL * copy connection kwargs in scheduler * fix * chmod the cert * Skip SSL tests in CImain
parent
3aaa1c1209
commit
75a610bd4d
@ -1,11 +1,19 @@
|
||||
FROM ubuntu:latest
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y redis-server python3-pip
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
redis-server \
|
||||
python3-pip \
|
||||
stunnel
|
||||
|
||||
COPY tests/ssl_config/private.pem tests/ssl_config/stunnel.conf /etc/stunnel/
|
||||
|
||||
COPY . /tmp/rq
|
||||
WORKDIR /tmp/rq
|
||||
RUN pip3 install -r /tmp/rq/requirements.txt -r /tmp/rq/dev-requirements.txt
|
||||
RUN python3 /tmp/rq/setup.py build && python3 /tmp/rq/setup.py install
|
||||
RUN pip3 install -r /tmp/rq/requirements.txt -r /tmp/rq/dev-requirements.txt \
|
||||
&& python3 /tmp/rq/setup.py build \
|
||||
&& python3 /tmp/rq/setup.py install
|
||||
|
||||
CMD redis-server& RUN_SLOW_TESTS_TOO=1 pytest /tmp/rq/tests/ --durations=5 -v --log-cli-level 10
|
||||
CMD stunnel \
|
||||
& redis-server \
|
||||
& RUN_SLOW_TESTS_TOO=1 RUN_SSL_TESTS=1 pytest /tmp/rq/tests/ --durations=5 -v --log-cli-level 10
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker build . -t rqtest && docker run --rm rqtest
|
||||
docker build . -t rqtest && docker run -it --rm rqtest
|
||||
|
@ -0,0 +1,85 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIJKwIBAAKCAgEAwN/TmlUJWSo8rWLAf94FUqWlFieMnitFbeOkpZsVI5ROdUVl
|
||||
NvvCF1h/o6+PTff6kRuRDWMdxQed22Pk40K79mGz8rjgNCRBJehPIUgi27BZZac3
|
||||
diae4aTgHsp6I0sw4+vT/4xbwfQoF+S2W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WugOPVwfeU0ePg06Kr2yVPwtia4dW7YXm0dXHxn+7sMjg
|
||||
stJ4aqjlOiudLyb3wsRgnFDSzM5YZwtz3hCnbKhgDf5Qayywj/9VJWGpVbuQkmoq
|
||||
QQRVNAs=
|
||||
-----END CERTIFICATE-----
|
@ -0,0 +1,13 @@
|
||||
cert=/etc/stunnel/private.pem
|
||||
fips=no
|
||||
foreground=yes
|
||||
sslVersion=all
|
||||
socket=l:TCP_NODELAY=1
|
||||
socket=r:TCP_NODELAY=1
|
||||
pid=/var/run/stunnel.pid
|
||||
debug=0
|
||||
output=/etc/stunnel/stunnel.log
|
||||
|
||||
[redis]
|
||||
accept = 0.0.0.0:9736
|
||||
connect = 127.0.0.1:6379
|
Loading…
Reference in New Issue