-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
94 lines (87 loc) · 2.03 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
version: '3'
services:
redis:
image: redis:latest
container_name: redis
api:
build:
context: ./src/api/marketplace
ports:
- "8000:8000"
volumes:
- type: bind
source: ./src/api/marketplace
target: /api/marketplace
consistency: cached
- type: volume
target: /api/marketplace/venv
consistency: cached
depends_on:
- psql
environment:
- POSTGRES_NAME=marketplace
- POSTGRES_USER=mp_dev
- POSTGRES_PASSWORD=xsdrt1768
- DJANGO_SETTINGS_MODULE=marketplace.settings
- PYTHONPATH=/api/marketplace
container_name: api
ui:
build:
context: ./src/ui
image: react:latest
ports:
- "3000:3000"
volumes:
- type: bind
source: ./src/ui
target: /ui
consistency: cached
- type: volume
target: /ui/node_modules
consistency: cached
environment:
- NODE_OPTIONS="--max-old-space-size=6024"
command: yarn dev
depends_on:
- api
container_name: ui
psql:
image: postgres:latest
environment:
- POSTGRES_NAME=marketplace
- POSTGRES_USER=mp_dev
- POSTGRES_PASSWORD=xsdrt1768
ports:
- "5432:5432"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
container_name: psql
# Celery worker
celery-worker:
restart: always
build:
context: ./src/api/marketplace
volumes:
- ./src/api:/api
command: celery -A marketplace worker -l DEBUG
container_name: celery_worker
depends_on:
- redis
- api
environment:
- DJANGO_SETTINGS_MODULE=marketplace.settings
- PYTHONPATH=/api/marketplace
# Celery Scheduler
celery-beat:
restart: always
build:
context: ./src/api/marketplace
volumes:
- ./src/api:/api
command: celery -A marketplace beat -l DEBUG
container_name: celery_beat
depends_on:
- celery-worker
environment:
- DJANGO_SETTINGS_MODULE=marketplace.settings
- PYTHONPATH=/api/marketplace