-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.cpu.yml
73 lines (66 loc) · 2.15 KB
/
docker-compose.cpu.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
# exactly the same with docker-compose.yml except for the removal of
# "deploy" and "ipc" values from the "app"
version: "3.8"
services:
db:
image: postgres:14
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
# the default values set here are just placeholder to show the default values
# used in `database_setup.database_direct_setup()`,
# these environment variables can be loaded from a '.env' file too
environment:
POSTGRES_DB: ${POSTGRES_DB:-integrated_vision_inspection_system}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-shrdc}
ports:
- 6543:5432
networks:
- app_network
mosquitto:
image: eclipse-mosquitto:2.0.14
restart: unless-stopped
# 8883 is used instead of 1883 to avoid conflict with local broker,
# this port is defined in ./mosquitto.conf
ports:
- 8883:8883
- 9001:9001
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
- mosquitto-data:/mosquitto/data/
networks:
- app_network
app:
image: integrated_vision_inspection_system-cpu
restart: unless-stopped
build:
context: .
dockerfile: ./Dockerfile.cpu
# Currently, DEBUG=1 will only set the logging level to DEBUG
# Set DEBUG to 1 to show all the logging messages for developers
environment:
DEBUG: ${DEBUG:-0}
POSTGRES_DB: ${POSTGRES_DB:-integrated_vision_inspection_system}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-shrdc}
# care that the `myuser` name is used in the Dockerfile
# this volume directly binds to the directory obtained by `appdirs` library
# in Python in path_desc.py
volumes:
- app-data:/root/.local/share/integrated-vision-inspection-system
# Note that this port is based on the .streamlit/config.toml file
ports:
- 8502:8502
- 6007:6007
# use this to create/start the database first before creating/booting up this image
depends_on:
- db
networks:
- app_network
volumes:
postgres-data:
mosquitto-data:
app-data:
# this network is to allow connection to the mosquitto-broker
# from our app container
networks:
app_network: