forked from ParallaxOrakolo/Omnis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
123 lines (116 loc) · 2.87 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
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
version: "3.1"
services:
mongo:
profiles: ["production", "development"]
privileged: true
image: mongo:4.2
container_name: mongo_c
restart: always
ports:
- ${DB_PORT}:27017
environment:
MONGO_INITDB_DATABASE: ${DB_NAME}
# MONGO_INITDB_ROOT_USERNAME: ${DB_USER}
# MONGO_INITDB_ROOT_PASSWORD: ${DB_PASS}
networks:
- bind-network
volumes:
- ./mongodb:/data/db
mongo-express:
profiles: ["production","development"]
privileged: true
image: mongo-express:latest
restart: always
ports:
- 8888:8081
environment:
ME_CONFIG_MONGODB_SERVER: mongo_c
ME_CONFIG_MONGODB_PORT: ${DB_PORT}
ME_CONFIG_BASICAUTH_USERNAME: ${EXPRESS_USER}
ME_CONFIG_BASICAUTH_PASSWORD: ${EXPRESS_PASSWORD}
links:
- mongo
networks:
- bind-network
depends_on:
- mongo
volumes:
- ./mongodb:/data/db
logging:
options:
max-size: 50m
backend:
profiles: ["production", "development"]
privileged: true
container_name: backend
image: omnisofc/backend:latest
build:
context: ./backend
restart: unless-stopped
env_file:
- .env.development
ports:
- ${SERVER_PORT}:${SERVER_PORT}
environment:
DB_HOST: mongo_c
LOG_LEVEL: ${LOG_LEVEL}
links:
- mongo-express
networks:
- bind-network
# Enable access to the camera and serial devices (if the device is connected, otherwise it will fail)
# devices:
# - "/dev/ttyACM0:/dev/ttyACM0"
# - "/dev/video0:/dev/video0"
# - "/dev/video2:/dev/video2"
# - "/dev/video4:/dev/video4"
volumes:
# Share /dev is insecure but is required for the camera and serial devices that not has connected to the host. ( disable this if all devices are connected to the host )
- ./backend:/app
- ./.ssh:/.ssh
- /home/ubuntu/.url_host:/app/.url_host
- /dev:/dev
- /var/run/shutdown_signal:/shutdown_signal
command: python main.py
depends_on:
- mongo-express
logging:
options:
max-size: 50m
frontend:
profiles: ["production"]
privileged: true
container_name: frontend
image: omnisofc/frontend:latest
build:
context: ./frontend/
restart: always
volumes:
- ./frontend/dist:/app
ports:
- 80:80
networks:
- bind-network
- default
links:
- backend
depends_on:
- backend
logging:
options:
max-size: 50m
host_commands:
profiles: ["production", "development"]
container_name: command
restart: unless-stopped
image: omnisofc/host_commands:latest
build:
context: ./host_commands
ports:
- 3000:3000
volumes:
# - ./host_commands:/usr/src/app
- /var/run/host_signal:/command
networks:
bind-network:
driver: bridge