-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
92 lines (88 loc) · 2.58 KB
/
docker-compose-dev.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
version: '3'
services:
study-db:
image: postgres:10.3-alpine
container_name: study-db
ports:
- ${POSTGRES_PORT:-5432}:5432
volumes:
- ".:/studyportal-nexus:rw"
environment:
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_HOST: ${POSTGRES_HOST}
healthcheck:
test: "pg_isready -U studyportal -d studyportal"
study-es:
image: docker.elastic.co/elasticsearch/elasticsearch:7.1.0
container_name: study-es
ports:
- ${ELASTICSEARCH_PORT:-9200}:9200
environment:
# disable XPack
# https://www.elastic.co/guide/en/elasticsearch/reference/5.3/docker.html#_security_note
- xpack.security.enabled=false
- discovery.type=single-node
healthcheck:
test: ["CMD-SHELL", "curl -si -XGET 'localhost:9200/_cluster/health?pretty' | grep -qE 'yellow|green'"]
interval: 10s
timeout: 60s
retries: 10
ulimits:
nofile:
soft: 65536
hard: 65536
study-redis:
container_name: study-redis
image: redis
ports:
- "${REDIS_PORT:-6379}:6379"
volumes:
- ../data/redis:/data
entrypoint: redis-server --appendonly yes
restart: always
study-backend:
container_name: study-backend
build:
context: .
dockerfile: ./docker/development/Dockerfile.dev
command: bash -c '
python manage.py makemigrations;
python manage.py migrate;
python manage.py search_index --rebuild -f;
python manage.py runserver 0.0.0.0:8005'
volumes:
- ".:/usr/app:rw"
ports:
- ${STUDY_BE_PORT:-8005}:8005
depends_on:
- study-db
- study-es
- study-redis
environment:
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_USER: ${DATABASE_USER}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_HOST: ${DATABASE_HOST}
DATABASE_PORT: ${POSTGRES_PORT}
PYTHONUNBUFFERED: "0"
DJANGO_DEBUG_ENABLED: ${DJANGO_DEBUG_ENABLED}
ELASTICSEARCH_HOST: ${ELASTICSEARCH_HOST}
ELASTICSEARCH_PORT: ${ELASTICSEARCH_PORT}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
DISABLE_GLOBAL_THROTTLING: ${DISABLE_GLOBAL_THROTTLING}
ROOT_SHORTENING_URL: ${ROOT_SHORTENING_URL}
DEVELOPMENT_MODE: ${DEVELOPMENT_MODE}
CLIENT_ID: ${CLIENT_ID}
CLIENT_SECRET: ${CLIENT_SECRET}
ACCESS_URL: ${ACCESS_URL}
USER_URL: ${USER_URL}
ACCOUNTS_URL: ${ACCOUNTS_URL}
REDIRECT_URL: ${REDIRECT_URL}
stdin_open: true
tty: true
networks:
default:
name: studyportal