forked from nautobot/nautobot-docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.ldap.yml
85 lines (85 loc) · 2.22 KB
/
docker-compose.ldap.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
---
version: "3.7"
services:
nautobot:
image: "companyname/nautobot-ldap"
build:
args:
PYTHON_VER: "${PYTHON_VER:-3.9}"
context: "./"
dockerfile: "Dockerfile-LDAP"
target: "final"
env_file:
- "local.env"
ports:
- "8443:8443"
- "8080:8080"
restart: "unless-stopped"
depends_on:
- "postgres"
- "redis"
nautobot-worker:
build:
args:
PYTHON_VER: "${PYTHON_VER:-3.9}"
context: "./"
dockerfile: "Dockerfile-LDAP"
target: "final"
image: "companyname/nautobot-ldap"
env_file:
- "local.env"
entrypoint: "nautobot-server rqworker"
depends_on:
- "nautobot"
- "redis"
restart: "unless-stopped"
# healthcheck: "none"
healthcheck:
interval: "15s"
timeout: "10s"
start_period: "5s"
retries: 3
test: ["CMD", "nautobot-server", "health_check"]
# ----------------------------------
# Celery worker must only be used in > 1.1.0 installs. If setting to a previous install, remove this worker
# ----------------------------------
celery_worker:
build:
args:
PYTHON_VER: "${PYTHON_VER:-3.9}"
context: "./"
dockerfile: "Dockerfile-LDAP"
target: "final"
image: "companyname/nautobot-ldap"
entrypoint: "sh -c 'nautobot-server celery worker -l $$NAUTOBOT_LOG_LEVEL'"
healthcheck:
interval: "30s"
timeout: "10s"
start_period: "30s"
retries: 3
test: ["CMD", "bash", "-c", "nautobot-server celery inspect ping --destination celery@$$HOSTNAME"] ## $$ because of docker-compose
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: