forked from vulekamali/datamanager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
128 lines (117 loc) · 3.37 KB
/
docker-compose.yml
File metadata and controls
128 lines (117 loc) · 3.37 KB
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
##########################################################################################
#
# This is for DEVELOPMENT purposes. We deploy using similar configuration but using dokku.
#
##########################################################################################
version: '3'
services:
db:
image: postgres:9.6
environment:
- POSTGRES_USER=budgetportal
- POSTGRES_PASSWORD=devpassword
- POSTGRES_DB=budgetportal
volumes:
- db-data:/var/lib/postgresql/data
app:
build:
context: .
dockerfile: Dockerfile-dev
command: python manage.py runserver_plus --nopin 0.0.0.0:8000
environment:
- DATABASE_URL=postgresql://budgetportal:devpassword@db/budgetportal
- DJANGO_DEBUG_TOOLBAR
- AWS_ACCESS_KEY_ID=minio-access-key
- AWS_SECRET_ACCESS_KEY=minio-secret-key
- AWS_STORAGE_BUCKET_NAME=budgetportal-storage
- AWS_S3_ENDPOINT_URL=http://minio:9000
- AWS_S3_SECURE_URLS=True
- AWS_S3_CUSTOM_DOMAIN
- SOLR_URL=http://solr:8983/solr/budgetportal
- DEBUG_CACHE
- DJANGO_WHITENOISE_AUTOREFRESH=TRUE
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
- solr
- minio-client
- minio
# Should be same as app except for command and ports
worker:
build:
context: .
dockerfile: Dockerfile-dev
command: python manage.py qcluster
environment:
- DATABASE_URL=postgresql://budgetportal:devpassword@db/budgetportal
- DJANGO_DEBUG_TOOLBAR=${DJANGO_DEBUG_TOOLBAR}
- AWS_ACCESS_KEY_ID=minio-access-key
- AWS_SECRET_ACCESS_KEY=minio-secret-key
- AWS_STORAGE_BUCKET_NAME=budgetportal-storage
- AWS_S3_ENDPOINT_URL=http://minio:9000
- SOLR_URL=http://solr:8983/solr/budgetportal
volumes:
- .:/code
depends_on:
- db
- solr
- minio
restart: on-failure
test:
build:
context: .
dockerfile: Dockerfile-test
command: bin/wait-for-db.sh coverage run --source='budgetportal' manage.py test
environment:
- DATABASE_URL=postgresql://budgetportal:devpassword@db/budgetportal
- AWS_ACCESS_KEY_ID=minio-access-key
- AWS_SECRET_ACCESS_KEY=minio-secret-key
- AWS_STORAGE_BUCKET_NAME=budgetportal-storage
- AWS_S3_ENDPOINT_URL=http://minio:9000
- AWS_S3_SECURE_URLS=True
- SOLR_URL=http://solr:8983/solr/budgetportal-test
- DJANGO_Q_SYNC=TRUE
volumes:
- .:/code
depends_on:
- db
- solr
- minio
minio:
image: "minio/minio:RELEASE.2019-10-12T01-39-57Z"
volumes:
- minio-data:/data
ports:
- "9000:9000"
environment:
- MINIO_ACCESS_KEY=minio-access-key
- MINIO_SECRET_KEY=minio-secret-key
- MINIO_DOMAIN=minio
command: minio --compat server data
minio-client:
image: "minio/mc"
depends_on:
- minio
environment:
- MINIO_ACCESS_KEY=minio-access-key
- MINIO_SECRET_KEY=minio-secret-key
- MINIO_DOMAIN=minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc mb budgetportal-storage;
/usr/bin/mc policy set public budgetportal-storage;
"
solr:
build: "https://github.com/vulekamali/solr-dokku.git"
image: budgetportal-solr
ports:
- "8983:8983"
volumes:
- solr-data:/opt/solr/server/solr/budgetportal/data
volumes:
db-data:
minio-data:
solr-data: