Commit Graph

44 Commits

Author SHA1 Message Date
Christian Mäder f46d8a7782 Adds Prometheus/Grafana monitoring infrastructure 2020-10-26 15:22:52 +01:00
Tobias Genannt 74833a9b21 Update images in docker-compose 2020-09-01 13:34:42 +02:00
Tobias Genannt b9c44b85cc The Redis cache container was using the wrong env
Our docker-compose.yml pointed the env file for the Redis cache to the
wrong file. Now the Redis cache password between the netbox.env and
redis-cache.env match.
2020-02-14 12:38:05 +01:00
Christian Mäder 355f9d4cf7 Prepare for Netbox 2.7 2020-01-20 08:39:26 +01:00
Christian Mäder b118cd5812 Building the Docker image with Github Actions 2019-12-23 18:21:08 +01:00
Christian Mäder 0a9991de96
Merge pull request #186 from netbox-community/non-root
Non root
2019-12-20 14:21:34 +01:00
Christian Mäder 28c786c2a6
Merge pull request #195 from netbox-community/update-postgres
Update PostgreSQL to 11
2019-12-20 11:43:17 +01:00
Christian Mäder e4e0a63e17 Better safe than sorry, keep PostgreSQL at 11 for now. 2019-12-10 22:41:57 +01:00
Christian Mäder 150f35ea3b update postgres to 12 2019-11-26 12:23:16 +01:00
Christian Mäder 1ce99cf02f update redis 2019-11-26 12:14:51 +01:00
Christian Mäder 7942e9edbe Remove the named user, change permissions to 'g+w' 2019-11-26 11:24:12 +01:00
Christian Mäder 01c4137dc9 Adds netbox user 2019-11-26 11:24:12 +01:00
EdenPark59 08cda559a3
Update docker-compose.yml 2019-11-20 11:00:09 +01:00
sylvain.petit 02a5171e37 Update Nginx 1.17.6-alpine docker-compose.yml 2019-11-20 10:09:02 +01:00
Christian Mäder 8428b9cdbd Merge branch 'custom-scripts' of https://github.com/ScanPlusGmbH/netbox-docker into ScanPlusGmbH-custom-scripts 2019-10-15 12:28:22 +02:00
Christian Mäder f3b9c34e3b externalize netbox download with wget 2019-10-15 00:34:15 +02:00
Christian Mäder d0ebb34432 Refactor to multistage builds
This commit introduces a huge change in the build process.

What changed:

- Dockerfile.ldap was integrated into Dockerfile as a seperate
  [build stage][multistage-build].
- All the build scripts were refactored according to this.
- The `docker-compose.yml` file was adjusted likewise.
- The main build script, `/build.sh`, now always builds all
  targets (formerly called variants).
- The minimal requirements for Docker and docker-compose
  have increased.
- The build on hub.docker.com must be adjusted.

This change should also fix #156 permanently.

[multistage-build]: https://docs.docker.com/develop/develop-images/multistage-build/
2019-10-15 00:34:15 +02:00
Tobias Genannt db04deca0d Add support for custom scripts
Custom scripts were added to Netbox in version 2.6.3. This adds a new
directory to the image where custom scripts can be placed.
2019-10-14 09:50:05 +02:00
Kyle Fagan e45773c29f
Add shared (z) container volume SELinux labels to the volumes created by docker-compose. 2019-03-25 16:22:37 -04:00
Christian Mäder 6182133c7a
Update references to netboxcommunity 2019-02-06 11:46:20 +01:00
Brady Lamprecht aab28d03ba Changing 'reports' from a volume to a mapped directory
This will allow eaiser interaction with the report functionality of the 'netbox' container.
2018-12-19 16:26:24 -07:00
Brady Lamprecht d8285b05f2 Moving env files into separate directory for better organization 2018-09-05 15:37:28 -06:00
Christian Mäder fdefa3465d
🆙 Update nginx to the latest version 2018-08-13 15:30:43 -07:00
Christian Mäder 645ec1281c
Use a default Redis password
Although it does not provide any additional security, it shows how to
configure Redis with a password and how to use Netbox using a password
protected redis server. Something that might be considered in a classic
production deployment. (But is mostly irrelevant in e.g. a Kubernetes /
OpenShift deployment as the isolation is usually on a network level.)
2018-08-13 15:19:29 -07:00
Christian Mäder 013f81b791
♻️ Make netbox-worker it's own container
One container should ideally have one responsibility [1]. Therefore I
implemented the netbox-worker to start in it's own container. This is
possible, because netbox and the worker communicate via redis anyway.

They still use the same image underneath, just the "command" they
execute while starting different.

Or in other words: I see no reason to introduce supervisord, when we
already have docker-compose which can take care of running multiple
processes.

Also, here's another benefit: Now it's possible to view the logs of the
webhook worker independently of the other netbox logs (and vice-versa).

Other changes in this commit:
* I don't see a reason to put a password for Redis in the docker-compose
  setup, so I removed it.
* Slightly changed the nginx config, so that the nginx startup command
  becomes simpler and any error should be visible in the docker log.
* Some housekeeping in the `Dockerfile`.
* Added some troubleshooting advice regarding webhooks to the README.

I'd like to thank Brady (@bdlamprecht [2]) here who did the harder
work of figuring out what's even required to have webhooks working. [3]

[1] 
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#decouple-applications
[2] https://github.com/bdlamprecht
[3] https://github.com/ninech/netbox-docker/pull/90
2018-08-13 14:04:09 -07:00
Brady Lamprecht b88974ef9f Working implementation of webhooks using new 'redis' container 2018-08-10 17:55:09 -06:00
hex2a b544fa5e4f
docker-compose: use latest postgres minor version (10.4) 2018-07-28 18:22:55 +02:00
Tobias Genannt b46bd58e0a
Move config to /etc/netbox/config (Fixes #54)
With this the configuration is moved to /etc/netbox/config and the
default reports directory is set to /etc/netbox/reports. This enables
the user to mount reports from a config map or persistent volume in
OpenShift.
2018-04-04 10:13:30 +02:00
Tobias Genannt ef76e4e8ea Modifications for Openshift
With these modifications the netbox containers can run on Openshift.
The configuration files can be imported from a config map to the
'/etc/netbox' directory and will be loaded from there.
2018-02-22 17:22:04 +01:00
Christian Mäder ba2b49339f
⬆️ Updates Dependencies
* Postgres 9.6 -> 10.2
* Nginx 1.11 -> 1.13
2018-02-16 10:34:33 +01:00
Christian Mäder bab8618650
❇️ Make relevant mounts read-only
Some mounts are not supposed to be writable by
a container. The docker-compose file has been
improved in that direction in order to enforce this.
2018-02-16 10:30:26 +01:00
Christian Mäder 43cb9f7e50
Include Initializers
Initializers are startup scripts for common tasks like creating custom
fields. These are problems many users of Netbox Docker potentially face
and are therefore worth sharing.
2018-02-16 10:25:51 +01:00
David Dieulivol 8e98b8d870 Load custom fields when creating the container. 2018-01-25 09:58:27 +01:00
Brady Lamprecht a68d09e815 Adding a named volume for 'postgresql-data'. 2018-01-10 12:31:25 -07:00
Brady Lamprecht e398390630 Adding a named volume for 'postgresql-data'. 2018-01-10 12:29:41 -07:00
Christian Mäder bd9298e668
❇️ Make the default configuration cluster ready
This changes the default configuration to be better prepared for
usage with container management platforms, such as Docker Swarm,
Kubernetes or OpenShift.

Closes #27.
2017-12-14 12:53:19 +01:00
Christian Mäder 843342d972
Document the use of the build variable 2017-10-16 13:33:12 +02:00
misazr de9b6a853d
🐳 Extracted postgres env into new file 2017-08-30 12:12:17 +02:00
Christian Mäder 4ce4373eb0
🐳 By default, build `latest` from the `master` branch 2017-08-30 11:07:28 +02:00
Christian Mäder 1072d243a3
Fixes logging config that prevented gunicon launch 2017-06-19 09:24:35 +02:00
Christian Mäder d9c1bd143d
Add suggestions from PRs in digitalocean/netbox-drocker 2017-06-09 10:14:43 +02:00
Christian Mäder 898683eeb2
Updated for v2.0-beta3 2017-04-28 08:17:22 +02:00
Christian Mäder ecb5ecd1a4
Restructured docker-compose.yml 2017-04-21 13:46:15 +02:00
Jeremy Stretch 582b2abea8 Copied Docker components from main repo 2017-04-19 10:48:21 -04:00