-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.yaml
49 lines (48 loc) · 1.38 KB
/
compose.yaml
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
---
services:
netbox:
env_file:
- development/dev.env
build:
context: .
dockerfile: development/Dockerfile
image: netbox-plugin-development:${COMPOSE_PROJECT_NAME}
depends_on:
- postgres
- redis
- redis-cache
volumes:
- ./development/configuration/plugins.py:/etc/netbox/config/plugins.py:z,ro
- ./development/configuration/logging.py:/etc/netbox/config/logging.py:z,ro
- ./development/demo-data.json:/tmp/demo-data.json:z,ro
- ./:/source
command: >
sh -c "python manage.py migrate && python manage.py collectstatic --noinput && python manage.py runserver 0.0.0.0:8000"
ports:
- "8000:8000"
# postgres
postgres:
image: postgres:15-alpine
env_file:
- development/dev.env
volumes:
- postgres-data:/var/lib/postgresql/data
# redis
redis:
image: redis:7-alpine
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env
- redis-server --appendonly yes --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose
env_file:
- development/dev.env
redis-cache:
image: redis:7-alpine
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env
- redis-server --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose
env_file:
- development/dev.env
volumes:
postgres-data: