-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
90 lines (83 loc) · 1.92 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
version: '3'
services:
postgis:
image: ${DOCKER_POSTGIS_IMAGE}
restart: unless-stopped
volumes:
- postgres_data:/var/lib/postgresql/data
container_name: iotserver-postgis
ports:
- "5432:5432"
env_file:
- .env
environment:
- POSTGRES_USER=${IOTSERVER_POSTGRES_USER}
- POSTGRES_PASS=${IOTSERVER_POSTGRES_PASSWORD}
- POSTGRES_DB=${IOTSERVER_POSTGRES_DBNAME}
- POSTGRES_MULTIPLE_EXTENSIONS=postgis
- ALLOW_IP_RANGE=0.0.0.0/0
networks:
services-network:
aliases:
- postgis
healthcheck:
test: "PGPASSWORD=${IOTSERVER_POSTGRES_PASSWORD} pg_isready -h 127.0.0.1 -U ${IOTSERVER_POSTGRES_USER} -d ${IOTSERVER_POSTGRES_DBNAME}"
interval: 5s
timeout: 5s
retries: 5
memcached:
image: memcached
restart: unless-stopped
container_name: iotserver-memcached
ports:
- "11211:11211"
networks:
services-network:
aliases:
- memcached
mqtt:
image: eclipse-mosquitto
restart: unless-stopped
volumes:
- ./docker/mqtt:/mosquitto/config/
container_name: iotserver-mqtt
ports:
- "1883:1883"
networks:
services-network:
aliases:
- mqtt
api:
build: .
restart: unless-stopped
volumes:
- ./:/usr/src/app
container_name: iotserver-api
env_file:
- .env
environment:
- IOTSERVER_DJANGO_DEBUG=1
- IOTSERVER_POSTGRES_HOST=postgis
- IOTSERVER_MQTT_HOST=mqtt
- IOTSERVER_MEMCACHED_LOCATION=memcached:11211
depends_on:
postgis:
condition: service_healthy
links:
- postgis
- memcached
- mqtt
ports:
- "8000:8000"
networks:
services-network:
aliases:
- api
command: ["./entrypoint.sh"]
volumes:
postgres_data:
external: true
networks:
services-network:
name: services-network
driver: bridge