-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.staging.yaml
More file actions
128 lines (119 loc) · 2.94 KB
/
docker-compose.staging.yaml
File metadata and controls
128 lines (119 loc) · 2.94 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
services:
elasticsearch:
container_name: elasticseach_GESIS_staging
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.11
restart: always
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "xpack.security.enabled=false"
ports:
- "9200:9200"
- "9300:9300"
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
kibana:
container_name: kibana_GESIS_staging
image: docker.elastic.co/kibana/kibana:7.17.11
restart: always
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
ports:
- "5601:5601"
depends_on:
- elasticsearch
logstash:
container_name: logstash_GESIS_staging
image: docker.elastic.co/logstash/logstash:7.17.11
restart: always
volumes:
- ./logstash/pipeline:/usr/share/logstash/pipeline
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
ports:
- "5044:5044"
- "9600:9600"
depends_on:
- elasticsearch
redis:
container_name: redis_GESIS_staging
image: redis:7.0.11-alpine
restart: always
app:
container_name: api_GESIS_staging
build:
context: .
restart: always
volumes:
- static-data:/vol/static
environment:
- DB_HOST=db
- DB_NAME=dbname
- DB_USER=rootuser
- DB_PASSWORD=changeme
- DJANGO_SECRET_KEY=changeme
- DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1
depends_on:
- db
db:
container_name: db_GESIS_staging
image: postgres:13.3-alpine
restart: always
environment:
- POSTGRES_DB=dbname
- POSTGRES_USER=rootuser
- POSTGRES_PASSWORD=changeme
volumes:
- postgres-data:/var/lib/postgresql/data
celery:
container_name: celery_GESIS_staging
build:
context: .
args:
- DEV=true
volumes:
- ./app:/app
command: >
sh -c "celery -A app worker -l info"
environment:
- DB_HOST=db
- DB_NAME=dbname
- DB_USER=rootuser
- DB_PASSWORD=changeme
- DJANGO_SECRET_KEY=changeme
- DJANGO_ALLOWED_HOSTS=localhost,
depends_on:
- redis
- db
# Simplified proxy service, assuming no SSL or using self-signed certs
proxy:
container_name: proxy_GESIS_staging
build:
context: ./docker/proxy
restart: always
depends_on:
- app
ports:
- 80:80
- 443:443
volumes:
- static-data:/vol/static
- certbot-web:/vol/www
- proxy-dhparams:/vol/proxy
- certbot-certs:/etc/letsencrypt
environment:
- DOMAIN=staging.example.com
# The certbot service could be omitted or left in a skipped state as in production
certbot:
image: certbot/certbot
command: echo "Certbot not used in staging"
volumes:
- certbot-web:/var/www
- certbot-certs:/etc/letsencrypt
volumes:
static-data:
postgres-data:
certbot-web:
certbot-certs:
proxy-dhparams:
elasticsearch-data: