forked from Uninett/nav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
103 lines (94 loc) · 2.62 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
# 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: .
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: .
command: ["/source/tools/docker/web.sh"]
ports:
- "80:80"
volumes_from:
- nav
depends_on:
- nav
restart: on-failure:5
postgres:
image: "postgres:9.6"
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: .
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