-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
132 lines (130 loc) · 3.02 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
127
128
129
130
131
132
version: '3'
services:
web:
build:
context: .
dockerfile: app/Dockerfile.web
env_file: .env
environment:
DEBUG: "True"
DATABASE_URL: "postgres://postgres:hackme@db:5432/postgres"
MONGODB_URI: "mongodb://mongo:27017/main"
REDIS_URL: "redis://redis:6379"
S3_ACCESS_KEY: "minio"
S3_ACCESS_SECRET: "minio123"
S3_BUCKET: "filestorage"
S3_ENDPOINT: "http://storage:9000"
S3_DOMAIN: "http://localhost:9000/filestorage"
GUNICORN_ARGS: "--reload"
ports:
- "8080:8080"
volumes:
- ./app:/app:ro
- ./lib:/pythonpkg/lib:ro
- ./feeds:/pythonpkg/feeds:ro
depends_on:
- db
- mongo
- storage
- redis
worker:
build:
context: .
dockerfile: worker/Dockerfile
volumes:
- ./worker:/worker:ro
- ./lib:/pythonpkg/lib:ro
- ./feeds:/pythonpkg/feeds:ro
- ./app/backend:/pythonpkg/backend:ro
- ./app/bot:/pythonpkg/bot:ro
- ./app/main:/pythonpkg/main:ro
env_file: .env
environment:
DATABASE_URL: "postgres://postgres:hackme@db:5432/postgres"
MONGODB_URI: "mongodb://mongo:27017/main"
REDIS_URL: "redis://redis:6379"
depends_on:
- db
- mongo
- redis
web-migrate:
build:
context: .
dockerfile: app/Dockerfile.web
command: "'sleep 1; python manage.py migrate'"
env_file: .env
environment:
DATABASE_URL: "postgres://postgres:hackme@db:5432/postgres"
volumes:
- ./app:/app:ro
- ./lib:/pythonpkg/lib:ro
- ./feeds:/pythonpkg/feeds:ro
depends_on:
- db
db:
image: postgres:alpine
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql
environment:
POSTGRES_PASSWORD: hackme
mongo:
image: mongo:latest
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
storage:
image: minio/minio
volumes:
- storage_data:/data
ports:
- "9000:9000"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server /data
createbuckets:
image: minio/mc
depends_on:
- storage
entrypoint: >
/bin/sh -c "
mc config host add myminio http://storage:9000 minio minio123 &&
mc mb myminio/filestorage &&
mc policy download myminio/filestorage
"
redis:
image: redis:alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
localtunnel:
image: wdrdata/localtunnel
env_file: .env
restart: always
depends_on:
- web
command: --port 8080 --subdomain ${TUNNEL_NAME} --host https://lt.infra.wdr.cloud
network_mode: "host"
worker_dashboard:
build:
context: .
dockerfile: worker/Dockerfile
command: mrq-dashboard
ports:
- "5555:5555"
env_file: .env
environment:
MONGODB_URI: "mongodb://mongo:27017/main"
REDIS_URL: "redis://redis:6379"
depends_on:
- mongo
- redis
volumes:
db_data: {}
mongo_data: {}
redis_data: {}
storage_data: {}