Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abn/noc-docker
NOC Project Docker container
https://github.com/abn/noc-docker
Last synced: 7 days ago
JSON representation
NOC Project Docker container
- Host: GitHub
- URL: https://github.com/abn/noc-docker
- Owner: abn
- Created: 2015-07-08T13:58:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-08T15:53:25.000Z (over 9 years ago)
- Last Synced: 2024-12-07T09:11:49.950Z (19 days ago)
- Language: Shell
- Size: 129 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NOC Project Docker container
Docker container for the [NOC Project](https://kb.nocproject.org/).
## Quickstart
Note that if the containers are not already downloaded, this will take a few minutes to complete.```sh
curl -O https://raw.githubusercontent.com/abn/noc-docker/master/noc
chmod 755 noc# this starts the database containers and the data container
./noc start# upgrade before running in order to finalize onfiguration
./noc upgrade
./noc runserver
```Once this is complete, you should be able to access NOC by visiting http://localhost:8000.
## Configuring NOC
The `noc` helper script sets up your environment such that an instance named `noc-data` is used to persist data between runs. To edit configuration, you can load this up in any container with your favorite editor and modify files located at `/opt/noc/etc`.```sh
docker run --rm -it --volumes-from noc-data fedora:22 bash
```This command will drop you into a shell with the data mounted.
## Configuring Database Passwords
The database passwords can be configured by either modifying the `noc` script or by using the environment variables `PG_PASSWORD` and/or `MONGO_PASSWORD` before initializing.## Accessing databases
### Postgres
```sh
docker run -it --link noc-postgres:postgres \
-e "PGPASSWORD=${PG_PASSWORD}" \
-e "COMMAND=${COMMAND}" \
--rm postgres bash -c 'psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U noc'
```
### MongoDB
```sh
docker run -it --link noc-mongo:mongo \
-e "COMMAND=${MONGO_CREATE_USER}" \
--rm mongo bash -c 'mongo "$MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT/noc"'
```