-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
96 lines (89 loc) · 2.72 KB
/
docker-compose.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
95
96
version: "3.8"
networks:
djangoflex-network:
driver: bridge
services:
rabbitmq:
image: ${RABBITMQ_DOCKER_IMAGE:-rabbitmq:3-management}
container_name: ${RABBITMQ_DOCKER_CONTAINER_NAME:-rabbitmq_container}
ports:
- "${RABBITMQ_PORT:-5675}:5672"
- "${RABBITMQ_DASHBOARD_PORT:-15676}:15672"
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USER:-guest}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD:-guest}
- RABBITMQ_DEFAULT_VHOST=${RABBITMQ_VHOST:-/}
command: rabbitmq-server
networks:
- djangoflex-network
srs:
image: ${SRS_DOCKER_IMAGE:-ossrs/srs:5}
container_name: ${SRS_DOCKER_CONTAINER_NAME:-srs_container}
ports:
- "${SRS_SERVER_PORT:-1935}:1935"
- "${SRS_HTTP_SERVER_PORT:-8080}:8080"
- "1985:1985"
command: /usr/local/srs/objs/srs -c /usr/local/srs/conf/srs.conf
networks:
- djangoflex-network
postgres:
image: ${POSTGRES_DOCKER_IMAGE:-postgres:13}
container_name: ${POSTGRES_DOCKER_CONTAINER_NAME:-postgres_container}
ports:
- "${POSTGRES_SERVER_PORT:-5435}:5432"
environment:
- POSTGRES_USER=${POSTGRES_ROOT_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_ROOT_PASSWORD:-your_postgres_password}
- POSTGRES_DB=${POSTGRES_DATABASE:-your_postgres_database}
volumes:
- ${POSTGRES_DATA_DIR:-./volume/postgres/data}:/var/lib/postgresql/data
# - postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
networks:
- djangoflex-network
redis:
image: ${REDIS_DOCKER_IMAGE:-redis:6.2.4}
container_name: ${REDIS_DOCKER_CONTAINER_NAME:-redis_container}
ports:
- "${REDIS_SERVER_PORT:-6399}:6379"
volumes:
- ${REDIS_DATA_DIR:-./volume/redis/data}:/data
command: redis-server
networks:
- djangoflex-network
django:
build:
context: .
dockerfile: Dockerfile.django
container_name: django_container
command: >
sh -c "python djangoFlex/manage.py makemigrations videoCap_server visionAI_server &&
python djangoFlex/manage.py migrate &&
python djangoFlex/manage.py runserver 0.0.0.0:8000"
volumes:
- .:/app
ports:
- "8000:8000"
environment:
- DJANGO_SETTINGS_MODULE=djangoFlex.settings.djangoFlex
- PYTHONPATH=/app
- IS_DOCKER=True
- NETWORK_NAME=djangoflex-network
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
rabbitmq:
condition: service_started
srs:
condition: service_started
networks:
- djangoflex-network
volumes:
postgres_data:
redis_data: