Initial setup

master
Drew Bednar 2 years ago
parent bd282fdb49
commit 2c1d4870c0

1
.gitignore vendored

@ -1,3 +1,4 @@
rabbitdata/
# ---> Python
# Byte-compiled / optimized / DLL files
__pycache__/

@ -1,3 +1,29 @@
# learn_dramatiq
Learn Dramatiq basics
## Docker Compose Backends
Since Dramatiq supports Redis and RabbitMQ as queue backends, there are two separate docker-compose files for each. These are temporary dev backends; no persistent volumes are used and there is no TLS.
Redis:
```
docker compose -f docker-compose-redis.yml up -d
```
```
docker compose -f docker-compose-redis.yml down
```
RabbitMQ:
It takes some time for RabbitMQ to serve requests. This does have a persistent volume.
```
docker compose -f docker-compose-rabbit.yml up -d
```
```
docker compose -f docker-compose-rabbit.yml down
```

@ -0,0 +1,4 @@
black
flake8
invoke
pip-tools

@ -0,0 +1,51 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile dev_requirements.in
#
black==22.8.0
# via -r dev_requirements.in
build==0.8.0
# via pip-tools
click==8.1.3
# via
# black
# pip-tools
flake8==5.0.4
# via -r dev_requirements.in
invoke==1.7.1
# via -r dev_requirements.in
mccabe==0.7.0
# via flake8
mypy-extensions==0.4.3
# via black
packaging==21.3
# via build
pathspec==0.10.1
# via black
pep517==0.13.0
# via build
pip-tools==6.8.0
# via -r dev_requirements.in
platformdirs==2.5.2
# via black
pycodestyle==2.9.1
# via flake8
pyflakes==2.5.0
# via flake8
pyparsing==3.0.9
# via packaging
tomli==2.0.1
# via
# black
# build
# pep517
typing-extensions==4.3.0
# via black
wheel==0.37.1
# via pip-tools
# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools

@ -0,0 +1,45 @@
# version: '3.9'
# services:
# # my-rabbitmq:
# # # Use Alpine for docker-compose.
# # image: rabbitmq:3-management-alpine
# # container_name: my-rabbitmq
# # hostname: my-rabbitmq-host
# # ports:
# # - "15762:15762"
# # - "5762:5762"
# # volumes:
# # - ".rabbitdata:/var/lib/rabbitmq"
# # environment:
# # - RABBITMQ_DEFAULT_USER=runcible
# # - RABBITMQ_DEFAULT_PASS=Testing123
# # - RABBITMQ_DEFAULT_VHOST=runcible
# # healthcheck:
# # test: [ "CMD", "nc", "-z", "localhost", "5672" ]
# # interval: 5s
# # timeout: 15s
# # retries: 1
version: "3.9"
services:
my-rabbit:
image: rabbitmq:3-management-alpine
container_name: my-rabbit
hostname: my-rabbit-host
environment:
# Defaults only created if db does not exist.
- RABBITMQ_DEFAULT_USER=runcible
- RABBITMQ_DEFAULT_PASS=Testing123
- RABBITMQ_DEFAULT_VHOST=runcible
ports:
- "15672:15672"
- "5672:5672"
volumes:
- ".rabbitdata:/var/lib/rabbitmq"
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "5672" ]
interval: 5s
timeout: 15s
retries: 1

@ -0,0 +1,10 @@
version: '3.8'
services:
redis:
image: redis:7.0.4-alpine
restart: always
ports:
- 6379:6379

@ -0,0 +1 @@
dramatiq[all]

@ -0,0 +1,45 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile requirements.in
#
async-timeout==4.0.2
# via redis
deprecated==1.2.13
# via redis
dramatiq[all]==1.13.0
# via -r requirements.in
gevent==21.12.0
# via
# dramatiq
# watchdog-gevent
greenlet==1.1.3
# via gevent
packaging==21.3
# via redis
pika==1.3.0
# via dramatiq
prometheus-client==0.14.1
# via dramatiq
pylibmc==1.6.3
# via dramatiq
pyparsing==3.0.9
# via packaging
redis==4.3.4
# via dramatiq
watchdog==2.1.9
# via
# dramatiq
# watchdog-gevent
watchdog-gevent==0.1.1
# via dramatiq
wrapt==1.14.1
# via deprecated
zope-event==4.5.0
# via gevent
zope-interface==5.4.0
# via gevent
# The following packages are considered to be unsafe in a requirements file:
# setuptools
Loading…
Cancel
Save