Skip to content

Commit 7e65865

Browse files
phackskraynel
authored andcommitted
Swap SQS for Redis
1 parent 6f9ab18 commit 7e65865

File tree

4 files changed

+101
-93
lines changed

4 files changed

+101
-93
lines changed

.env.example

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
DJANGO_SETTINGS_MODULE=root.settings.dev
2-
CELERY_BROKER_URL=sqs://foo:bar@localstack:4576
2+
CELERY_BROKER_URL=redis://redis:6379/0
3+
C_FORCE_ROOT=true
34
DB_CYPHER_KEY=whatever
45
SECRET_KEY=pleasechangethissecretkey
56

backend/Pipfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ptvsd = "==4.2.8"
1515
pytz = "==2019.1"
1616
requests = "==2.21.0"
1717
djangorestframework = "==3.9.2"
18-
celery = {extras = ["sqs"],version = "==4.3.0"}
18+
celery = {extras = ["sqs", "redis"],version = "==4.3.0"}
1919
django-celery-beat = "==1.4.0"
2020
djangorestframework-simplejwt = "==4.3.0"
2121
djoser = "==1.5.1"

backend/Pipfile.lock

+92-71
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-compose.yml

+6-20
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ services:
77
- "5432:5432"
88
volumes:
99
- ./postgres-data:/var/lib/postgresql/data
10+
1011
backend:
1112
build: ./backend
1213
command: python /code/manage.py rundebugserver 0.0.0.0:80
@@ -17,37 +18,22 @@ services:
1718
- "9000:9000"
1819
links:
1920
- db
20-
- localstack
21+
- redis
2122
env_file:
2223
- .env
2324
environment:
2425
DATABASE_URL: "postgres://postgres@db:5432/postgres"
2526

26-
localstack:
27-
image: localstack/localstack
28-
ports:
29-
- "4567-4584:4567-4584"
30-
- "${PORT_WEB_UI-8080}:${PORT_WEB_UI-8080}"
31-
environment:
32-
- SERVICES=sqs
33-
- DEBUG=${DEBUG- }
34-
- DATA_DIR=${DATA_DIR- }
35-
- PORT_WEB_UI=${PORT_WEB_UI- }
36-
- LAMBDA_EXECUTOR=${LAMBDA_EXECUTOR- }
37-
- KINESIS_ERROR_PROBABILITY=${KINESIS_ERROR_PROBABILITY- }
38-
- DOCKER_HOST=unix:///var/run/docker.sock
39-
- HOSTNAME_EXTERNAL=localstack
40-
volumes:
41-
- "${TMPDIR:-/tmp/localstack}:/tmp/localstack"
42-
- "/var/run/docker.sock:/var/run/docker.sock"
27+
redis:
28+
image: redis
4329

4430
celeryworker:
4531
build: ./backend
4632
volumes:
4733
- ./backend:/code
4834
links:
4935
- db
50-
- localstack
36+
- redis
5137
env_file:
5238
- .env
5339
environment:
@@ -60,7 +46,7 @@ services:
6046
- ./backend:/code
6147
links:
6248
- db
63-
- localstack
49+
- redis
6450
env_file:
6551
- .env
6652
environment:

0 commit comments

Comments
 (0)