forked from SpriteLink/NIPAP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to newest or replacement libs Fix syntax to 3.6+ Overhaul strings to optimize performance and readability Update build stuff to 3.6 + move docker img to 18.04/bionic
- Loading branch information
Showing
21 changed files
with
1,470 additions
and
1,605 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ | |
# via a volume. | ||
# | ||
|
||
FROM ubuntu:xenial | ||
FROM ubuntu:bionic | ||
MAINTAINER Kristian Larsson <[email protected]> | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
@@ -44,19 +44,30 @@ RUN apt-get update -qy && apt-get upgrade -qy \ | |
libpq-dev \ | ||
libsqlite3-dev \ | ||
postgresql-client \ | ||
python \ | ||
python-all \ | ||
python-docutils \ | ||
python-pip \ | ||
python-dev \ | ||
&& pip --no-input install envtpl \ | ||
software-properties-common \ | ||
python3 \ | ||
python3-all \ | ||
python3-pip \ | ||
python3-dev \ | ||
libsasl2-dev \ | ||
libldap2-dev \ | ||
libssl-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install any additional CA certs from ca_certs folder required by corp proxies etc | ||
RUN mkdir -p /usr/share/ca-certificates/extra | ||
COPY ca_certs/*.crt /usr/share/ca-certificates/extra/ | ||
RUN ls /usr/share/ca-certificates/extra/*.crt | sed 's/\/usr\/share\/ca-certificates\///g' >> /etc/ca-certificates.conf | ||
RUN update-ca-certificates | ||
RUN pip3 install --upgrade pip | ||
RUN pip3 config set global.cert /etc/ssl/certs/ca-certificates.crt | ||
|
||
|
||
COPY nipap /nipap | ||
WORKDIR /nipap | ||
RUN pip --no-input install -r requirements.txt \ | ||
&& python setup.py install | ||
RUN pip3 install --no-input envtpl | ||
RUN pip3 --no-input install -r requirements.txt \ | ||
&& python3 setup.py install | ||
|
||
EXPOSE 1337 | ||
ENV LISTEN_ADDRESS=0.0.0.0 LISTEN_PORT=1337 SYSLOG=false DB_PORT=5432 DB_SSLMODE=disable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Custom CA Certs for docker containers | ||
===================================== | ||
If you need to include specific CA certs which you must trust, place them here | ||
in PEM format, named \*.crt. | ||
|
||
This may be required if you need to build the container from inside a network | ||
which uses a proxy or similar, or other dependencies towards internal services | ||
are included in your containers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
include README.rst MANIFEST.in | ||
include *.man.rst | ||
include requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,13 @@ Source: nipap | |
Maintainer: Lukas Garberg <[email protected]> | ||
Section: python | ||
Priority: optional | ||
Build-Depends: python (>= 2.7), debhelper (>= 7.4.3) | ||
Build-Depends: python (>= 3.6), debhelper (>= 7.4.3) | ||
Standards-Version: 4.4.0 | ||
|
||
|
||
Package: nipap-common | ||
Architecture: all | ||
Depends: python (>= 2.7), ${misc:Depends}, python-pysqlite2, python-ipy | ||
Depends: python (>= 3.6), ${misc:Depends}, python-pysqlite2, python-ipy | ||
Suggests: python-ldap | ||
Description: Neat IP Address Planner | ||
The Neat IP Address Planner, NIPAP, is a system built for efficiently managing | ||
|
@@ -17,7 +17,7 @@ Description: Neat IP Address Planner | |
|
||
Package: nipapd | ||
Architecture: all | ||
Depends: debconf, nipap-common, python (>= 2.7), ${misc:Depends}, python-psycopg2, python-flask, python-flask-xml-rpc, python-flask-restful, python-flask-compress, python-tornado, python-parsedatetime, python-tz, python-dateutil, python-psutil, python-pyparsing, python-jwt, python-requests | ||
Depends: debconf, nipap-common, python (>= 3.6), ${misc:Depends}, python-psycopg2, python-flask, python-flask-xml-rpc, python-flask-restful, python-flask-compress, python-tornado, python-parsedatetime, python-tz, python-dateutil, python-psutil, python-pyparsing, python-jwt, python-requests | ||
Description: Neat IP Address Planner XML-RPC daemon | ||
The Neat IP Address Planner, NIPAP, is a system built for efficiently managing | ||
large amounts of IP addresses. This is the XML-RPC daemon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
#!/bin/sh | ||
|
||
envtpl --allow-missing /nipap/nipap.conf.dist -o /etc/nipap/nipap.conf | ||
envtpl --allow-missing --keep-template /nipap/nipap.conf.dist -o /etc/nipap/nipap.conf | ||
/bin/bash /nipap/wait-for-it.sh -t 60 $DB_HOST:$DB_PORT -- sleep 5 | ||
|
||
/usr/sbin/nipap-passwd create-database | ||
if [ -n "$NIPAP_USERNAME" -a -n "$NIPAP_PASSWORD" ]; then | ||
echo "Creating user '$NIPAP_USERNAME'" | ||
/usr/sbin/nipap-passwd add --username $NIPAP_USERNAME --name "NIPAP user" --password $NIPAP_PASSWORD | ||
fi | ||
|
||
echo "Starting nipap daemon.." | ||
exec /usr/sbin/nipapd --debug --foreground --auto-install-db --auto-upgrade-db --no-pid-file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.