-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
75 lines (70 loc) · 1.76 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
version: "3.8"
services:
db:
image: postgres:12.5-alpine
container_name: db
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=${RECIPY_DATABASE_NAME}
- POSTGRES_USER=${RECIPY_DATABASE_USER}
- POSTGRES_PASSWORD=${RECIPY_DATABASE_PASSWORD}
env_file:
- .env
ports:
- "5433:5432"
crawlers:
container_name: crawlers
build:
context: ./crawlers
dockerfile: Dockerfile
command: bash -c "
python /app/api/manage.py migrate
&& ./deploy.sh
"
depends_on:
- db
- api
env_file:
- .env
environment:
- RECIPY_DATABASE_NAME=${RECIPY_DATABASE_NAME}
- RECIPY_DATABASE_USER=${RECIPY_DATABASE_USER}
- RECIPY_DATABASE_PASSWORD=${RECIPY_DATABASE_PASSWORD}
- RECIPY_DATABASE_HOST=${RECIPY_DATABASE_HOST}
- RECIPY_DATABASE_PORT=${RECIPY_DATABASE_PORT}
ports:
- "6800:6800"
volumes:
- ./scrapyd:/var/lib/scrapyd
api:
container_name: api
build:
context: ./crawlers
dockerfile: Dockerfile
command: bash -c "python /app/api/manage.py migrate
&& python /app/api/manage.py runserver 0.0.0.0:8000"
ports:
- "8000:8000"
depends_on:
- db
env_file:
- .env
environment:
- RECIPY_DATABASE_NAME=${RECIPY_DATABASE_NAME}
- RECIPY_DATABASE_USER=${RECIPY_DATABASE_USER}
- RECIPY_DATABASE_PASSWORD=${RECIPY_DATABASE_PASSWORD}
- RECIPY_DATABASE_HOST=${RECIPY_DATABASE_HOST}
- RECIPY_DATABASE_PORT=${RECIPY_DATABASE_PORT}
front:
container_name: front
build:
context: ./frontend
dockerfile: Dockerfile
command: npm start
ports:
- "3000:3000"
depends_on:
- api
volumes:
postgres_data: