forked from scanopy/scanopy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
133 lines (127 loc) · 3.45 KB
/
docker-compose.dev.yml
File metadata and controls
133 lines (127 loc) · 3.45 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
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
124
125
126
127
128
129
130
131
132
133
services:
ui:
build:
context: ./ui
dockerfile: Dockerfile.dev
volumes:
- ./ui:/app
- /app/node_modules
ports:
- "5173:5173"
networks:
netvisor-dev:
ipv4_address: 172.25.0.2
postgres:
image: postgres:17-alpine
environment:
POSTGRES_DB: netvisor
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
netvisor-dev:
ipv4_address: 172.25.0.6
server:
build:
context: ./backend
dockerfile: Dockerfile.dev
command: sh -c "cargo run --bin server"
ports:
- "60072:60072"
environment:
- RUST_LOG=debug,sqlx=off,tower_http=off
- NETVISOR_DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD:-password}@postgres:5432/netvisor
- NETVISOR_WEB_EXTERNAL_PATH=/app/static
- NETVISOR_LOG_LEVEL=${NETVISOR_LOG_LEVEL:-debug}
- NETVISOR_INTEGRATED_DAEMON_URL=${NETVISOR_INTEGRATED_DAEMON_URL:-http://daemon:60073}
volumes:
- ./backend:/app
- data-volume:/data
- ui-build:/app/static:ro
- cargo-cache:/usr/local/cargo/registry
- cargo-git:/usr/local/cargo/git
- server-target:/app/target
depends_on:
postgres:
condition: service_healthy
daemon:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:60072/api/health"]
interval: 5s
timeout: 3s
retries: 10
start_period: 600s
networks:
netvisor-dev:
ipv4_address: 172.25.0.3
daemon:
build:
context: ./backend
dockerfile: Dockerfile.dev
privileged: true
restart: unless-stopped
environment:
- NETVISOR_SERVER_TARGET=${NETVISOR_SERVER_TARGET:-http://server}
- NETVISOR_SERVER_PORT=${NETVISOR_SERVER_PORT:-60072}
- NETVISOR_DAEMON_PORT=${NETVISOR_DAEMON_PORT:-60073}
- NETVISOR_BIND_ADDRESS=${NETVISOR_BIND_ADDRESS:-0.0.0.0}
- NETVISOR_NAME=${NETVISOR_NAME:-netvisor-daemon}
- NETVISOR_LOG_LEVEL=${NETVISOR_LOG_LEVEL:-debug}
- NETVISOR_HEARTBEAT_INTERVAL=${NETVISOR_HEARTBEAT_INTERVAL:-30}
volumes:
- ./backend:/app
- ./data/daemon_config:/root/.config/netvisor/daemon
- cargo-cache:/usr/local/cargo/registry
- cargo-git:/usr/local/cargo/git
- daemon-target:/app/target
command: sh -c "cargo run --bin daemon"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:60073/api/health || exit 1"]
interval: 5s
timeout: 3s
retries: 15
start_period: 600s
networks:
netvisor-dev:
ipv4_address: 172.25.0.4
homeassistant:
image: lscr.io/linuxserver/homeassistant:latest
container_name: homeassistant-discovery
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
volumes:
- homeassistant-config:/config
ports:
- 8123:8123
restart: unless-stopped
networks:
netvisor-dev:
ipv4_address: 172.25.0.5
volumes:
ui-build:
cargo-cache:
cargo-git:
server-target:
daemon-target:
data-volume:
daemon-config-volume:
postgres_data:
homeassistant-config:
networks:
netvisor-dev:
driver: bridge
ipam:
config:
- subnet: 172.25.0.0/28
gateway: 172.25.0.1