-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
62 lines (55 loc) · 1.3 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
62 lines (55 loc) · 1.3 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
services:
worker: &worker
build:
context: ../
dockerfile: ./development/Dockerfile
args:
NETBOX_VERSION: ${NETBOX_VERSION}
command: ./start.sh $DEBUGWORKER manage.py rqworker
ports:
- "5679:5678"
depends_on:
postgres:
condition: service_healthy
restart: true
redis:
condition: service_started
env_file: .env
environment:
- POSTGRES_HOST=postgres
- REDIS_CACHE_HOST=redis
- REDIS_HOST=redis
volumes:
- ./configuration.py:/opt/netbox/netbox/netbox/configuration.py
- ../validity:/plugin/validity/validity
networks:
- netboxnet
netbox:
<<: *worker
command: ./start.sh $DEBUGWEB manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
- "5678:5678"
postgres:
image: postgres:14-alpine
env_file: .env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB} -h 127.0.0.1"]
interval: 10s
retries: 5
start_period: 10s
timeout: 10s
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- netboxnet
redis:
image: redis:7-alpine
command: --appendonly yes --requirepass $REDIS_PASSWORD
env_file: .env
networks:
- netboxnet
volumes:
pgdata:
networks:
netboxnet: