-
Notifications
You must be signed in to change notification settings - Fork 0
/
production.yml
72 lines (67 loc) · 1.64 KB
/
production.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
version: '3'
volumes:
static:
database:
esdata:
redis_data:
services:
hellodjango.rest.framework.tutorial:
build:
context: .
dockerfile: compose/production/django/Dockerfile
image: hellodjango_rest_framework_tutorial
container_name: hellodjango_rest_framework_tutorial
working_dir: /app
volumes:
- database:/app/database
- static:/app/static
env_file:
- .envs/.production
expose:
- "8000"
command: /start.sh
depends_on:
- elasticsearch
- redis
nginx:
build:
context: .
dockerfile: compose/production/nginx/Dockerfile
image: hellodjango_rest_framework_tutorial_nginx
container_name: hellodjango_rest_framework_tutorial_nginx
volumes:
- static:/apps/hellodjango_rest_framework_tutorial/static
ports:
- "80:80"
- "443:443"
depends_on:
- hellodjango.rest.framework.tutorial
elasticsearch:
build:
context: .
dockerfile: ./compose/production/elasticsearch/Dockerfile
image: hellodjango_rest_framework_tutorial_elasticsearch
container_name: hellodjango_rest_framework_tutorial_elasticsearch
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- "9200:9200"
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
nproc: 65536
nofile:
soft: 65536
hard: 65536
redis:
image: 'bitnami/redis:5.0'
container_name: hellodjango_rest_framework_tutorial_redis
ports:
- '6379:6379'
volumes:
- 'redis_data:/bitnami/redis/data'
env_file:
- .envs/.production