This repository has been archived by the owner on Apr 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
126 lines (115 loc) · 2.66 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
version: "3.9"
volumes:
mongodb-data:
name: mongodb-data
services:
mongodb:
container_name: mongodb
image: mongo
restart: unless-stopped
volumes:
- mongodb-data:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
ports:
- 27017:27017
# healthcheck:
# test: echo 'db.runCommand("ping").ok' | mongo 10.10.10.60:27017/test --quiet
# interval: 30s
# timeout: 10s
# retries: 3
mongo-express:
image: mongo-express
container_name: mongodb-express
restart: unless-stopped
environment:
ME_CONFIG_MONGODB_SERVER: mongodb
ME_CONFIG_MONGODB_ENABLE_ADMIN: "true"
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example
ME_CONFIG_BASICAUTH_USERNAME: admin
ME_CONFIG_BASICAUTH_PASSWORD: admin123
volumes:
- mongodb-data:/data/db
depends_on:
- mongodb
ports:
- 8081:8081
# healthcheck:
# test: wget --quiet --tries=3 --spider http://admin:[email protected]:8081 || exit 1
# interval: 30s
# timeout: 10s
# retries: 3
# restart: unless-stopped
spider_1:
image: app
build: .
command: bash -c "cd stackspider && scrapy crawl programmersbot"
volumes:
- .:/backend
depends_on:
- mongodb
spider_2:
image: app
build: .
command: bash -c "cd stackspider && scrapy crawl jumpitbot"
volumes:
- .:/backend
depends_on:
- mongodb
spider_3:
image: app
build: .
command: bash -c "cd stackspider && scrapy crawl kiwizzlebot"
volumes:
- .:/backend
depends_on:
- mongodb
# 번역 자동화 할거면 이런식으로 할 생각이다.
# translate:
# image: app
# build: .
# command: python translate.py
# volumes:
# - .:/backend
# depends_on:
# - mongodb
web:
image: app
build: .
command: bash -c "cd backend && python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/backend
environment:
MONGOHOST: mongodb
MONGODB: stackdb
ME_CONFIG_MONGODB_ENABLE_ADMIN: "true"
USERNAME: root
PASSWORD: example
ports:
- "8000:8000"
expose:
- "8000"
depends_on:
- mongodb
# migration:
# build: .
# image: app
# command: python manage.py migrate
# volumes:
# - .:/StackLounge
# links:
# - mongodb
# depends_on:
# - make_migrations
# make_migrations:
# build: .
# image: app
# command: python manage.py makemigrations
# volumes:
# - .:/StackLounge
# links:
# - mongodb
# depends_on:
# - mongodb