forked from Uninett/nav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
115 lines (106 loc) · 2.8 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
# This sets up a live NAV development environment in Docker containers. This
# is NOT SUITABLE for production use of NAV. For more production-oriented
# containerization, have a look at the separate project
# https://github.com/Uninett/nav-container
#
version: '3'
services:
nav:
build:
context: .
args:
UID: $UID
GID: $GID
environment:
- NONAVSTART=0 # Set to 1 to disable startup of NAV backend processes when container starts
- PGHOST=postgres
- PGDATABASE=nav
- PGUSER=postgres
volumes:
- .:/source
- nav_config:/etc/nav
- nav_cache:/tmp/nav_cache
depends_on:
- postgres
restart: on-failure:5
# Uncomment if you want to start a jupyter notebook server to play with the NAV codebase
# jupyter:
# build:
# context: .
# args:
# CUSTOM_PIP: jupyter
# working_dir: /source
# command: su -c "jupyter-notebook --ip=0.0.0.0" nav
# ports:
# - "8888:8888"
# environment:
# - NONAVSTART=0 # Set to 1 to disable startup of NAV backend processes when container starts
# - PGHOST=postgres
# - PGDATABASE=nav
# - PGUSER=postgres
# - PYTHONPATH=/source/python
# volumes:
# - .:/source
# - nav_config:/etc/nav
# depends_on:
# - postgres
# Uncomment if you want a second container for group restricted backend services
# slave:
# build: .
# environment:
# - NONAVSTART=1 # Set to 1 to disable startup of NAV backend processes when container starts
# - PGHOST=postgres
# - PGDATABASE=nav
# - PGUSER=postgres
# volumes:
# - .:/source
# - slave_nav_config:/etc/nav
# depends_on:
# - postgres
web:
build:
context: .
args:
UID: $UID
GID: $GID
command: ["/source/tools/docker/web.sh"]
ports:
- "80:8080"
volumes_from:
- nav
depends_on:
- nav
restart: on-failure:5
postgres:
image: "postgres:13"
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
restart: on-failure:5
graphite:
build: ./tools/docker/graphite
ports:
- "8000:8000"
volumes:
- ./python/nav/etc/graphite/storage-schemas.conf:/etc/carbon/storage-schemas.conf
- ./python/nav/etc/graphite/storage-aggregation.conf:/etc/carbon/storage-aggregation.conf
restart: on-failure:5
# Add a service to continuously rebuild the Sphinx documentation if the doc
# directory is modified:
docbuild:
build:
context: .
args:
UID: $UID
GID: $GID
volumes_from:
- nav
command: /source/tools/docker/doc-watch.sh
restart: on-failure:5
volumes:
nav_config:
driver: local
nav_cache:
driver: local
# Uncomment if you want a second container for group restricted backend services
# slave_nav_config:
# driver: local