File tree Expand file tree Collapse file tree 5 files changed +87
-0
lines changed Expand file tree Collapse file tree 5 files changed +87
-0
lines changed Original file line number Diff line number Diff line change
1
+ version : " 3.9"
2
+
3
+ services :
4
+ db :
5
+ image : postgres:13.2
6
+ environment :
7
+ - POSTGRES_DB=styleguide_example_db
8
+ - POSTGRES_USER=postgres
9
+ - POSTGRES_PASSWORD=postgres
10
+
11
+ django :
12
+ build :
13
+ context : .
14
+ dockerfile : docker/local.Dockerfile
15
+ command : python manage.py runserver 0.0.0.0:8000
16
+ environment :
17
+ - DATABASE_URL=postgres://postgres:postgres@db:5432/styleguide_example_db
18
+ - CELERY_BROKER_URL=redis://redis
19
+ volumes :
20
+ - .:/app
21
+ ports :
22
+ - " 8000:8000"
23
+ depends_on :
24
+ - db
25
+ - redis
26
+ restart : on-failure
27
+
28
+ celery :
29
+ build :
30
+ context : .
31
+ dockerfile : docker/local.Dockerfile
32
+ command : celery --app=styleguide_example.tasks.celery worker --without-gossip --without-heartbeat --without-mingle --loglevel=info
33
+ environment :
34
+ - DATABASE_URL=postgres://postgres:postgres@db:5432/styleguide_example_db
35
+ - CELERY_BROKER_URL=redis://redis
36
+ volumes :
37
+ - .:/app
38
+ depends_on :
39
+ - db
40
+ - redis
41
+ restart : on-failure
42
+
43
+ beats :
44
+ build :
45
+ context : .
46
+ dockerfile : docker/local.Dockerfile
47
+ command : celery --app=styleguide_example.tasks.celery beat --loglevel=info
48
+ environment :
49
+ - DATABASE_URL=postgres://postgres:postgres@db:5432/styleguide_example_db
50
+ - CELERY_BROKER_URL=redis://redis
51
+ volumes :
52
+ - .:/app
53
+ depends_on :
54
+ - db
55
+ - redis
56
+ restart : on-failure
57
+
58
+ redis :
59
+ image : " redis:alpine"
Original file line number Diff line number Diff line change
1
+ # Creating image based on official python3 image
2
+ FROM python:3.9.4
3
+
4
+ # Fix python printing
5
+ ENV PYTHONUNBUFFERED 1
6
+
7
+ # Installing all python dependencies
8
+ ADD requirements/ requirements/
9
+ RUN pip install -r requirements/local.txt
10
+
11
+ # Get the django project into the docker container
12
+ RUN mkdir /app
13
+ WORKDIR /app
14
+ ADD ./ /app/
Original file line number Diff line number Diff line change
1
+ # Creating image based on official python3 image
2
+ FROM python:3.9.4
3
+
4
+ # Installing all python dependencies
5
+ ADD requirements/ requirements/
6
+ RUN pip install -r requirements/production.txt
7
+
8
+ # Get the django project into the docker container
9
+ RUN mkdir /app
10
+ WORKDIR /app
11
+ ADD ./ /app/
Original file line number Diff line number Diff line change
1
+ echo " --> Starting web app"
2
+ gunicorn config.wsgi:application -b 0.0.0.0:80
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ djangorestframework==3.13.1
6
6
celery==5.2.3
7
7
django-celery-results==2.2.0
8
8
django-celery-beat==2.2.1
9
+ celery[redis]
9
10
10
11
whitenoise==5.3.0
11
12
You can’t perform that action at this time.
0 commit comments