forked from uktrade/lite-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
119 lines (110 loc) · 2.24 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
version: '3.4'
services:
db:
image: "postgres:12"
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=lite-api
expose:
- 5432
ports:
- 5462:5432
networks:
- lite
api:
container_name: api
platform: linux/amd64
env_file:
- .env
build: .
volumes:
- .:/app
ports:
- 8100:8100
links:
- db
expose:
- 8100
command: pipenv run python manage.py runserver 0.0.0.0:${PORT:-8100}
networks:
- lite
stdin_open: true
tty: true
celery:
build: .
volumes:
- .:/app
env_file: .env
links:
- db
- redis
depends_on:
- api
command: pipenv run watchmedo auto-restart -d . -R -p '*.py' -- celery -A api.conf worker -l info
networks:
- lite
celery-scheduler:
build: .
volumes:
- .:/app
env_file: .env
links:
- db
- redis
depends_on:
- api
command: pipenv run watchmedo auto-restart -d . -R -p '*.py' -- celery -A api.conf beat
networks:
- lite
# Elasticsearch Docker Images: https://www.docker.elastic.co/
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.3
container_name: elasticsearch
environment:
- xpack.security.enabled=false
- xpack.ml.enabled=false
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms128m -Xmx1g
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
networks:
- lite
redis:
image: "redis:5-alpine"
container_name: redis
expose:
- 6379
ports:
- 6379:6379
networks:
- lite
s3:
image: minio/minio
ports:
- 9000:9000
- 9001:9001
entrypoint: sh
command: -c 'mkdir -p /buckets/uploads && mkdir -p /buckets/anonymiser && minio server /buckets --console-address ":9001"'
environment:
- MINIO_ROOT_USER=minio_username
- MINIO_ROOT_PASSWORD=minio_password
networks:
- lite
networks:
lite:
external: true
volumes:
elasticsearch-data:
driver: local