-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.local.yml
89 lines (85 loc) · 1.83 KB
/
docker-compose.local.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
version: '3'
services:
postgres:
container_name: nsi_db
restart: always
image: postgres:12
ports:
- "5432:5432"
env_file:
- app/.env
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- postgres_network
elasticsearch:
image: elasticsearch
build:
context: ./config/elasticsearch
dockerfile: Dockerfile
environment:
ES_JAVA_OPTS: -Xms512m -Xmx512m
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
networks:
- elastic_network
ports:
- 9200:9200
web:
container_name: nsi_backend
volumes:
- .:/app
- static_volume:/staticfiles
- media_volume:/mediafiles
env_file:
- app/.env
environment:
ELASTICSEARCH: elasticsearch
POSTGRES_HOST: postgres
build:
context: .
dockerfile: config/django/Dockerfile
depends_on:
- postgres
- elasticsearch
networks:
- postgres_network
- nginx_network
- elastic_network
nginx:
image: nginx:latest
build:
context: ./config/nginx
dockerfile: Dockerfile
ports:
- 8000:80
volumes:
- ./config/nginx/conf.d:/nginx.conf
- static_volume:/staticfiles
- media_volume:/mediafiles
depends_on:
- web
networks:
- nginx_network
networks:
postgres_network:
driver: bridge
nginx_network:
driver: bridge
elastic_network:
driver: bridge
volumes:
postgres_data:
static_volume:
media_volume:
elasticsearch-data:
driver: local