-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
48 lines (40 loc) · 1.06 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
version: '3.8' # the version compose with version docker
services:
djangoserver:
build: .
command: python manage.py runserver 0.0.0.0:8000 # um lockal docker mit lockal im gerät zuverbinden
ports:
- "8000:8000"
container_name: Backend
volumes:
- .:/app
depends_on:
- redis
redis:
image: redis:7.2.3-alpine3.18
container_name: redisserver
celery:
image: celery:4.0.2
container_name: celeryserver
build: .
depends_on:
- redis
- djangoserver
volumes:
- .:/app
command: celery -A project worker --loglevel=info
environment:
- CELERY_BROKER_URL = 'redis://redis:6379/0'
- CELERY_BACKEND_RESULTS = 'redis://redis:6379/0'
db:
image: postgres:latest
ports:
- "5432:5432"
environment:
POSTGRES_USER: env("DATABASE_USER")
POSTGRES_DB: env("DATABASE_NAME")
POSTGRES_PASSWORD: env("DATABASE_PASSWORD")
volumes:
- postgres_data:/var/lib/postgres/data #sodass den path immer gleich bleibt
volumes:
postgres_data: