-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose-develop.yml
91 lines (85 loc) · 2.1 KB
/
docker-compose-develop.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
# -----------------------------------------------------------------------------
# DOCKER COMPOSE DEVELOPMENT
# -----------------------------------------------------------------------------
# set environment variables on server:
# set -a && source .env.local
# setup or purge
# ./docker-purge.sh
# update
# ./docker-update.sh
# -----------------------------------------------------------------------------
version: '3'
volumes:
django_static:
driver: local
django_media:
driver: local
postgres_data:
driver: local
elasticsearch_data:
driver: local
vue_dist:
driver: local
node_modules:
driver: local
services:
postgres:
restart: always
image: postgres:13.0
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${PKDB_DB_NAME}
- POSTGRES_USER=${PKDB_DB_USER}
- POSTGRES_PASSWORD=${PKDB_DB_PASSWORD}
elasticsearch:
restart: always
environment:
- bootstrap.memory_lock=true
- discovery.type=single-node
- cluster.name=elasticsearch
- "ES_JAVA_OPTS=-Xms3g -Xmx3g"
- cluster.routing.allocation.disk.threshold_enabled=false
- xpack.license.self_generated.type=trial
ulimits:
memlock:
soft: -1
hard: -1
image: elasticsearch:7.9.2
ports:
- "9123:9200"
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
backend:
restart: always
build: ./backend
volumes:
- ./backend:/code
- django_static:/static
- django_media:/media
env_file:
- .env.local
expose:
- "8000"
ports:
- "8000:8000"
links:
- postgres:postgres
- elasticsearch:elasticsearch
depends_on:
- postgres
- elasticsearch
command: bash -c "/usr/local/bin/python manage.py runserver 0.0.0.0:8000"
frontend:
restart: always
build:
context: ./frontend
dockerfile: Dockerfile-develop
ports:
- "8081:8080"
volumes:
- ./frontend:/app
- node_modules:/app/node_modules/
- vue_dist:/usr/share/nginx/html