forked from nautobot/nautobot-docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
73 lines (73 loc) · 2.17 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
---
version: "3.7"
services:
nautobot:
image: "networktocode/nautobot:${NAUTOBOT_IMAGE:-1.2.4}-py${PYTHON_VER:-3.9}"
env_file:
- "local.env"
ports:
- "8443:8443"
- "8080:8080"
restart: "unless-stopped"
nautobot-worker:
image: "networktocode/nautobot:${NAUTOBOT_IMAGE:-1.2.4}-py${PYTHON_VER:-3.9}"
env_file:
- "local.env"
entrypoint: "nautobot-server rqworker"
depends_on:
- "nautobot"
restart: "unless-stopped"
# ----------------------------------
# Celery worker must only be used in > 1.1.0 installs. If setting to a previous install, remove this worker
# ----------------------------------
celery_worker:
image: "networktocode/nautobot:${NAUTOBOT_IMAGE:-1.2.4}-py${PYTHON_VER:-3.9}"
entrypoint: "sh -c 'nautobot-server celery worker -l $$NAUTOBOT_LOG_LEVEL'"
healthcheck:
interval: "5s"
timeout: "5s"
start_period: "5s"
retries: 3
test: ["CMD", "nautobot-server", "health_check"]
depends_on:
- "nautobot"
- "redis"
env_file:
- "./local.env"
tty: true
# ----------------------------------
# Celery beat must only be used in > 1.2.0 installs. If setting to a previous install, remove this worker
# ----------------------------------
celery_beat:
image: "networktocode/nautobot:${NAUTOBOT_IMAGE:-1.2.4}-py${PYTHON_VER:-3.9}"
entrypoint: "sh -c 'nautobot-server celery beat -l $$NAUTOBOT_LOG_LEVEL'"
healthcheck:
interval: "5s"
timeout: "5s"
start_period: "5s"
retries: 3
test: ["CMD", "nautobot-server", "health_check"]
depends_on:
- "nautobot"
- "redis"
env_file:
- "./local.env"
tty: true
redis:
image: "redis:alpine"
env_file:
- "local.env"
command:
- "sh"
- "-c" # this is to evaluate the $REDIS_PASSWORD from the env
- "redis-server --appendonly yes --requirepass $$NAUTOBOT_REDIS_PASSWORD" ## $$ because of docker-compose
restart: "unless-stopped"
postgres:
image: "postgres:14"
env_file:
- "local.env"
volumes:
- "postgres_data:/var/lib/postgresql/data"
restart: "unless-stopped"
volumes:
postgres_data: