-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
138 lines (128 loc) · 3.2 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
version: '3.7'
networks:
publicWeb:
netboxDatabase:
netboxRedis:
volumes:
tlsCertificates:
subscriberData:
netboxStatic:
netboxMedia:
netboxRedisData:
netboxDatabaseData:
x-netboxBase: &netboxBase
image: netboxcommunity/netbox:develop-2.8
restart: unless-stopped
environment:
CORS_ORIGIN_ALLOW_ALL: 'true'
DB_NAME: netbox
DB_USER: netbox
DB_HOST: netboxdatabase
REDIS_HOST: netboxredis
REDIS_SSL: 'false'
REDIS_DATABASE: 0
REDIS_CACHE_HOST: netboxRedisCache
REDIS_CACHE_DATABASE: 0
REDIS_CACHE_SSL: 'false'
services:
Web:
image: caddy/caddy:scratch
restart: unless-stopped
command: ['caddy', 'run', '--config', '/etc/Caddy/Caddyfile.json']
volumes:
- ./Caddyfile.json:/etc/Caddy/Caddyfile.json:ro
- type: volume
source: netboxStatic
target: /var/www/netbox/static
read_only: true
volume:
nocopy: true
networks:
- publicWeb
ports:
- 80:8080
- 443:8443/tcp
- 443:8443/udp
depends_on:
- SubscriberDL
labels:
com.ouroboros.enable: 'true'
# Repo: https://github.com/pyouroboros/ouroboros
Ouroboros:
image: pyouroboros/ouroboros
restart: unless-stopped
container_name: ouroboros
hostname: ouroboros
env_file: ENVs/Ouroboros.env
environment:
CLEANUP: 'true'
LOG_LEVEL: 'error'
SELF_UPDATE: 'true'
LABEL_ENABLE: 'true'
LABELS_ONLY: 'true'
TZ: 'America/Winnipeg'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- $HOME/.docker/config.json:/root/.docker/config.json:ro
netboxApp:
<<: *netboxBase
env_file: ENVs/Netbox.env
networks:
- publicWeb
- netboxDatabase
- netboxRedis
volumes:
- type: volume
source: netboxStatic
target: /opt/netbox/netbox/static
volume:
nocopy: false
- netboxMedia:/opt/netbox/netbox/media
depends_on:
- netboxDatabase
- netboxRedis
- netboxWorker
netboxWorker:
<<: *netboxBase
entrypoint: ['python3', '/opt/netbox/netbox/manage.py']
command: ['rqworker']
env_file: ENVs/Netbox.env
networks:
- netboxDatabase
- netboxRedis
depends_on:
- netboxDatabase
- netboxRedis
netboxDatabase:
image: postgres:11-alpine
restart: unless-stopped
env_file: ENVs/Database.env
environment:
POSTGRES_USER: netbox
POSTGRES_DB: netbox
volumes:
- netboxDatabaseData:/var/lib/postgresql/data
networks:
- netboxDatabase
netboxRedis:
image: redis:5-alpine
restart: unless-stopped
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: ENVs/Redis.env
volumes:
- netboxRedisData:/data
networks:
- netboxRedis
netboxRedisCache:
image: redis:5-alpine
restart: unless-stopped
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env
- redis-server --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose
env_file: ENVs/Redis.env
networks:
- netboxRedis