forked from netpicker/netpicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
161 lines (150 loc) · 3.67 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
version: "3.7"
x-api: &api_common
image: netpicker/api
environment:
ALLOWED_ORIGINS: '["*"]'
AUTH0_AUDIENCE: n/a
AUTH0_CLIENT_ID: n/a
AUTH0_CLIENT_SECRET: n/a
AUTH0_TENANT: n/a
CELERY_BROKER_URL: redis://redis
CELERY_RESULT_BACKEND: redis://redis
JWT_AUDIENCE: "netpicker"
JWT_ALGORITHM: HS256
JWT_SECRET: ew9023cnkljfcnsdlkfsfdhs
DB_URI: "postgresql+asyncpg://netpicker:netpicker@db/netpicker"
BEAT_DB_URI: "postgresql+psycopg2://netpicker:netpicker@db/netpicker"
PERSISTENT_VOLUME_PATH: /data/policy-repository
REDIS_URL: redis://redis
UVICORN_ROOT_PATH: /
WORKDIR_VOLUME_PATH: /data/policy-workdir
AUTH_BACKEND: netyce_alchemy
GIT_SERVER: git://gitd
GIT_REPO_MANAGER: '["gitd",9419]'
CLI_PROXY_HOST: agent
INIT_USER: '[email protected]'
INIT_PASSWORD: '12345678'
INIT_TENANT: 'default'
NETBOX_API: "https://netbox-endpoint/"
NETBOX_TOKEN: netbox_token_here
SLURPIT_URL: "https://slurpit-endpoint/"
SLURPIT_APIKEY: slurpit_apikey_here
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- policy-data:/data
depends_on:
- redis
- db
services:
db:
image: netpicker/db
container_name: db
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: s3rgts0p!
volumes:
- pg_data:/var/lib/postgresql/data:z
api:
<<: *api_common
container_name: api
labels:
service.netpicker.io: api
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/status"]
start_period: 5s
interval: 5s
celery:
<<: *api_common
container_name: celery
labels:
service.netpicker.io: celery
command: /run-celery
healthcheck:
test: ["CMD", "celery", "inspect", "ping", "-t", "5"]
start_period: 5s
interval: 30s
redis:
image: redis:7-alpine
container_name: redis
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
gitd:
image: netpicker/gitd
container_name: gitd
ports:
- "9418:9418" # Default port for git:// pull/push
- "9419:9419" # To manage new repos
volumes:
- git:/git
healthcheck:
test: echo "PING" | nc -v localhost 9419
start_period: 15s
interval: 5s
swagger:
image: swaggerapi/swagger-ui
container_name: swagger
environment:
SWAGGER_JSON_URL: "/openapi.json"
TRY_IT_OUT_ENABLED: true
ports:
- "8080:8080"
depends_on:
- api
frontend:
image: netpicker/frontend
container_name: frontend
labels:
service.netpicker.io: front-end
ports:
- "80:80"
depends_on:
- api
kibbitzer:
image: netpicker/kibbitzer
container_name: kibbitzer
volumes:
- secret:/run/secrets
entrypoint:
- /bin/true
restart: unless-stopped
agent:
hostname: agent
image: netpicker/agent:latest
container_name: agent
labels:
service.netpicker.io: agent
environment:
CLI_PROXY_ADDR: '0.0.0.0'
SHENV_SHOW_RUN_nokia_srl: 'info'
SHENV_PRIVILEGED_PLATFORMS: 'privileged_platform'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- config:/agent-config:z
- secret:/run/secrets:z
- transferium:/transferium:z
ports:
- 5514:5514/udp
- 6601:6601/tcp
- 6514:6514/tcp
- 8765:8765/tcp
- 9876:9876/tcp
restart: unless-stopped
depends_on:
api:
condition: service_healthy
healthcheck:
test: "echo LST | nc -v localhost 8765"
start_period: 2s
interval: 5s
volumes:
policy-data:
pg_data:
git:
config:
secret:
transferium: