-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (61 loc) · 1.48 KB
/
docker-compose.yml
File metadata and controls
67 lines (61 loc) · 1.48 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
services:
brainforces:
build: .
volumes:
- static_volume:/brainforces/static
- media_volume:/brainforces/media
command: >
sh -c "cd brainforces && python3 manage.py migrate && python3 manage.py search_index --rebuild && gunicorn --bind 0.0.0.0:8000 brainforces.wsgi"
ports:
- "8000:8000"
environment:
- DB_HOST=${DB_HOST}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
depends_on:
- database
- redis
- rabbitmq
- elastic
nginx:
image: nginx:1.23.4-alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- static_volume:/brainforces/static
- media_volume:/brainforces/media
depends_on:
- brainforces
ports:
- "80:80"
database:
image: postgres:15.2-alpine
restart: always
container_name: db
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
redis:
image: redis:7.0-alpine
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL,CONFIG
ports:
- "6379:6379"
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.9
restart: always
environment:
- "discovery.type=single-node"
ports:
- "9200:9200"
rabbitmq:
image: rabbitmq:3.12-management
hostname: rabbitmq
restart: always
ports:
- "5672:5672"
volumes:
static_volume:
media_volume: