-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
94 lines (89 loc) · 2.18 KB
/
docker-compose.prod.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
version: '3'
services:
postgres:
image: postgres:12
ports:
- "5432:5432"
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
networks:
- postgres_network
web:
image: ${ACR}/studentidrett-backend:${IMAGE_VERSION}
build:
context: .
dockerfile: config/django/Dockerfile
logging:
driver: "json-file"
environment:
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
ENV_NAME: ${ENV_NAME}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
ELASTICSEARCH: elasticsearch
networks:
- postgres_network
- nginx_network
- elastic_network
volumes:
- .:/app
- static_volume:/staticfiles
- media_volume:/mediafiles
depends_on:
- postgres
- elasticsearch
command: ["/usr/local/bin/elastic.sh"]
elasticsearch:
image: ${ACR}/studentidrett-backend:elastic-${IMAGE_VERSION}
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
nginx:
image: ${ACR}/studentidrett-backend:nginx-${IMAGE_VERSION}
build:
context: ./config/nginx
dockerfile: Dockerfile
ports:
- 80:80
volumes:
- ./config/nginx/conf.d:/nginx.conf
- static_volume:/staticfiles
- media_volume:/mediafiles
depends_on:
- web
networks:
- nginx_network
volumes:
postgres_data:
static_volume:
media_volume:
elasticsearch-data:
networks:
postgres_network:
driver: bridge
nginx_network:
driver: bridge
elastic_network:
driver: bridge