forked from acikyazilimagi/deprem-yardim-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (64 loc) · 1.6 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: '3.2'
services:
api:
container_name: trquake-app
build:
dockerfile: .docker/api/Dockerfile
context: .
ports:
- "8000:80"
environment:
- DJANGO_SETTINGS_MODULE=trquake.settings.development
- POSTGRES_PASSWORD=debug
- POSTGRES_USER=debug
- POSTGRES_DB=debug
- POSTGRES_HOST=trquake-database
- POSTGRES_PORT=5432
depends_on:
- database
- redis
workers:
container_name: trquake-workers
build:
dockerfile: .docker/scraper/Dockerfile
context: .
command: watchmedo auto-restart --directory=/app --pattern=*.py --recursive -- celery -A trquake.celery.app worker -B --concurrency=5 -l DEBUG
environment:
- DJANGO_SETTINGS_MODULE=trquake.settings.development
- POSTGRES_PASSWORD=debug
- POSTGRES_USER=debug
- POSTGRES_DB=debug
- POSTGRES_HOST=trquake-database
- POSTGRES_PORT=5432
depends_on:
- database
- redis
database:
image: postgres:15.1
container_name: trquake-database
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=debug
- POSTGRES_USER=debug
- POSTGRES_DB=debug
volumes:
- trquake_postgres:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 15s
timeout: 5s
retries: 5
redis:
container_name: trquake-redis
image: redis:alpine
command: redis-server --appendonly yes
volumes:
- redis_data:/data
ports:
- "6379:6379"
volumes:
trquake_postgres:
driver: local
redis_data:
driver: local