* [gentoo-commits] proj/euscan:docker-compose--wip--expect-force-pushes commit in: /
@ 2020-02-09 18:14 Sebastian Pipping
0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Pipping @ 2020-02-09 18:14 UTC (permalink / raw
To: gentoo-commits
commit: 9a1f580b5260f121cbf12c705fdea1777e38eec0
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 9 18:04:43 2020 +0000
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sun Feb 9 18:04:43 2020 +0000
URL: https://gitweb.gentoo.org/proj/euscan.git/commit/?id=9a1f580b
docker: Fix approach to installation of rddtool bindings
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
Dockerfile | 2 ++
requirements.txt | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 680ca48..9ea5cee 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -17,6 +17,8 @@ RUN eselect profile show \
&& \
echo 'PYTHON_TARGETS="${PYTHON_TARGETS} python2_7"' >> /etc/portage/make.conf \
&& \
+ echo 'PYTHON_SINGLE_TARGET="python2_7"' >> /etc/portage/make.conf \
+ && \
echo 'USE="${USE} bindist sqlite -syslog"' >> /etc/portage/make.conf
# NOTE: First build dependencies, then runtime-only dependencies
diff --git a/requirements.txt b/requirements.txt
index ee22ea2..391edc6 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -15,7 +15,6 @@ django-recaptcha==0.0.4
django-registration==0.8
matplotlib==2.2.5
python-ldap==2.4.10
-rrdtool==0.1.15
South==0.7
# Indirect dependencies
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/euscan:docker-compose--wip--expect-force-pushes commit in: /
@ 2020-02-09 21:25 Sebastian Pipping
0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Pipping @ 2020-02-09 21:25 UTC (permalink / raw
To: gentoo-commits
commit: f3cfe82d587d5efa73b828a1f69e3fa0136bdc1d
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 8 18:40:50 2020 +0000
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sun Feb 9 21:24:54 2020 +0000
URL: https://gitweb.gentoo.org/proj/euscan.git/commit/?id=f3cfe82d
docker: Dockerize euscanwww (W.I.P.)
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
Dockerfile | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++
docker-compose.yml | 33 +++++++++++++++++++++++++
docker-entrypoint.sh | 24 ++++++++++++++++++
requirements.txt | 42 +++++++++++++++++++++++++++++++
4 files changed, 169 insertions(+)
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..c8e088d
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,70 @@
+# Copyright 2020 Gentoo Authors
+# Licensed under the GNU General Public License v2
+
+FROM gentoo/stage3-amd64:20200208
+
+RUN wget https://gentoo.osuosl.org/snapshots/gentoo-latest.tar.xz \
+ && \
+ tar -C /var/db/repos/ -x -p -f gentoo-latest.tar.xz \
+ && \
+ mv /var/db/repos/gentoo-20??????/ /var/db/repos/gentoo/ \
+ && \
+ rm gentoo-latest.tar.xz
+
+RUN emaint sync --repo gentoo
+
+RUN eselect profile show \
+ && \
+ echo 'net-analyzer/rrdtool python' > /etc/portage/package.use/net-analyzer--rrdtool \
+ && \
+ echo 'dev-lang/python:2.7 sqlite tk' > /etc/portage/package.use/dev-lang--python \
+ && \
+ echo 'PYTHON_TARGETS="${PYTHON_TARGETS} python2_7"' >> /etc/portage/make.conf \
+ && \
+ echo 'PYTHON_SINGLE_TARGET="python2_7"' >> /etc/portage/make.conf \
+ && \
+ echo 'USE="${USE} bindist -syslog"' >> /etc/portage/make.conf
+
+# NOTE: First build dependencies, then runtime-only dependencies
+RUN emerge --tree -v -j2 --color y -1uU \
+ dev-lang/python:2.7 \
+ dev-libs/cyrus-sasl \
+ dev-python/pip \
+ dev-python/setuptools \
+ dev-python/wheel \
+ net-nds/openldap \
+ \
+ app-portage/eix \
+ app-portage/gentoolkit \
+ app-portage/layman \
+ net-analyzer/rrdtool \
+ sys-apps/portage \
+ && \
+ rm -f /var/cache/distfiles/*
+
+ENV PATH=/root/.local/bin/:${PATH}
+COPY requirements.txt /tmp/euscan/
+RUN pip2 install --user -r /tmp/euscan/requirements.txt
+
+COPY setup.py README.rst /tmp/euscan/
+COPY bin/ /tmp/euscan/bin/
+COPY pym/ /tmp/euscan/pym/
+COPY euscanwww/djeuscan/ /tmp/euscan/pym/djeuscan/
+COPY euscanwww/euscan_accounts/ /tmp/euscan/pym/euscan_accounts/
+COPY euscanwww/euscan_captcha/ /tmp/euscan/pym/euscan_captcha/
+COPY euscanwww/euscanwww/ /tmp/euscan/pym/euscanwww/
+
+COPY docker-entrypoint.sh /root/
+
+WORKDIR /tmp/euscan/
+
+RUN pip2 install --user .
+
+RUN pip2 check
+RUN bash -c 'diff -U0 <(pip2 freeze --user | sed "/^\(euscan\|virtualenv\)==/d" | sort -f) <(sed -e "s/ *#.*//" -e "/^$/d" /tmp/euscan/requirements.txt | sort -f)'
+
+RUN rm -Rf /tmp/euscan/
+
+EXPOSE 55080
+ENTRYPOINT ["/root/docker-entrypoint.sh"]
+CMD []
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..5bcec2f
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,33 @@
+# Copyright 2020 Gentoo Authors
+# Licensed under the GNU General Public License v2
+
+version: "3"
+
+services:
+ runserver:
+ depends_on:
+ - celeryd
+ image: ${COMPOSE_PROJECT_NAME}_celeryd:latest
+ environment:
+ DJANGO_SETTINGS_MODULE: euscanwww.settings
+ EUSCAN_SECRET_KEY: ${EUSCAN_SECRET_KEY:?}
+ tty: true
+
+ celerycam:
+ depends_on:
+ - celeryd
+ image: ${COMPOSE_PROJECT_NAME}_celeryd:latest
+ environment:
+ DJANGO_SETTINGS_MODULE: euscanwww.settings
+ EUSCAN_SECRET_KEY: ${EUSCAN_SECRET_KEY:?}
+ command: django-admin celerycam
+ tty: true
+
+ celeryd:
+ build:
+ context: .
+ environment:
+ DJANGO_SETTINGS_MODULE: euscanwww.settings
+ EUSCAN_SECRET_KEY: ${EUSCAN_SECRET_KEY:?}
+ command: django-admin celeryd -B -E -l INFO
+ tty: true
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
new file mode 100755
index 0000000..508d265
--- /dev/null
+++ b/docker-entrypoint.sh
@@ -0,0 +1,24 @@
+#! /usr/bin/env bash
+# Copyright 2020 Gentoo Authors
+# Licensed under the GNU General Public License v2
+
+set -e
+set -u
+
+PS4='# '
+set -x
+
+id
+ip addr
+
+manage_py() {
+ django-admin "$@"
+}
+
+if [[ $# -gt 0 ]]; then
+ exec "$@"
+fi
+
+manage_py migrate
+
+exec manage_py runserver 0.0.0.0:55080
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..8bfe7f6
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,42 @@
+# Direct dependencies (testing)
+factory-boy==1.1.3
+
+# Direct dependencies (command line utility)
+BeautifulSoup==3.2.1
+
+# Direct dependencies (web interface)
+ansi2html==0.9.1
+Django==1.8
+django-annoying==0.7.6
+django-auth-ldap==1.1
+django-celery==3.3.1
+django-piston==0.2.3
+django-recaptcha==0.0.4
+django-registration==2.4.1
+matplotlib==2.2.5
+python-ldap==2.4.10
+South==0.7
+
+# Indirect dependencies
+anyjson==0.3.3
+amqp==1.4.9 # <2.0 due to kombu 3.0.37
+backports.functools-lru-cache==1.6.1
+billiard==3.3.0.23 # <3.4 due to celery==3.1.25
+celery==3.1.25 # >=4 does not have celery.utils.timeutils
+configparser==4.0.2
+confusable-homoglyphs==3.2.0
+contextlib2==0.6.0.post1
+cycler==0.10.0
+importlib-metadata==1.5.0
+kiwisolver==1.1.0
+kombu==3.0.37 # <3.1 due to celery==3.1.25
+numpy==1.16.6
+pathlib2==2.3.5
+pyparsing==2.4.6
+python-dateutil==2.8.1
+pytz==2019.3
+scandir==1.10.0
+six==1.14.0
+subprocess32==3.5.4
+vine==1.3.0
+zipp==1.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/euscan:docker-compose--wip--expect-force-pushes commit in: /
@ 2020-02-09 23:16 Sebastian Pipping
0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Pipping @ 2020-02-09 23:16 UTC (permalink / raw
To: gentoo-commits
commit: 6aba927414d7befa769ede3f60c6773041d6d4df
Author: NP-Hardass <np.hardass <AT> gmail <DOT> com>
AuthorDate: Sun Jun 11 08:05:28 2017 +0000
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sun Feb 9 23:16:31 2020 +0000
URL: https://gitweb.gentoo.org/proj/euscan.git/commit/?id=6aba9274
setup.py: drop south, update minimum django version
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index fd9e6da..9a71420 100755
--- a/setup.py
+++ b/setup.py
@@ -91,7 +91,7 @@ setup(
# Command line utility
'BeautifulSoup>=3.2.1',
# Web interface
- 'Django>=1.4', 'django-annoying>=0.7.6', 'South>=0.7',
+ 'Django>=1.7', 'django-annoying>=0.7.6',
'django-piston>=0.2.3', 'matplotlib>=1.1.0',
'django-celery>=3.0.1', 'django-registration>=0.8',
'python-ldap>=2.4.10', 'django-auth-ldap>=1.1',
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/euscan:docker-compose--wip--expect-force-pushes commit in: /
@ 2020-02-09 23:16 Sebastian Pipping
0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Pipping @ 2020-02-09 23:16 UTC (permalink / raw
To: gentoo-commits
commit: bca3c0151fcb2fa409c26bc28044eba297250822
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 8 18:40:50 2020 +0000
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sun Feb 9 23:16:35 2020 +0000
URL: https://gitweb.gentoo.org/proj/euscan.git/commit/?id=bca3c015
docker: Dockerize euscanwww (W.I.P.)
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
Dockerfile | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++
docker-compose.yml | 44 ++++++++++++++++++++++++++++++++++
docker-entrypoint.sh | 20 ++++++++++++++++
requirements.txt | 41 ++++++++++++++++++++++++++++++++
4 files changed, 172 insertions(+)
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..9dda8ec
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,67 @@
+# Copyright 2020 Gentoo Authors
+# Licensed under the GNU General Public License v2
+
+FROM gentoo/stage3-amd64:20200208
+
+RUN wget https://gentoo.osuosl.org/snapshots/gentoo-latest.tar.xz \
+ && \
+ tar -C /var/db/repos/ -x -p -f gentoo-latest.tar.xz \
+ && \
+ mv /var/db/repos/gentoo-20??????/ /var/db/repos/gentoo/ \
+ && \
+ rm gentoo-latest.tar.xz
+
+RUN emaint sync --repo gentoo
+
+RUN eselect profile show \
+ && \
+ echo 'net-analyzer/rrdtool python' > /etc/portage/package.use/net-analyzer--rrdtool \
+ && \
+ echo 'dev-lang/python:2.7 sqlite tk' > /etc/portage/package.use/dev-lang--python \
+ && \
+ echo 'PYTHON_TARGETS="${PYTHON_TARGETS} python2_7"' >> /etc/portage/make.conf \
+ && \
+ echo 'PYTHON_SINGLE_TARGET="python2_7"' >> /etc/portage/make.conf \
+ && \
+ echo 'USE="${USE} bindist -syslog"' >> /etc/portage/make.conf
+
+# NOTE: First build dependencies, then runtime-only dependencies
+RUN emerge --tree -v -j2 --color y -1uU \
+ dev-lang/python:2.7 \
+ dev-libs/cyrus-sasl \
+ dev-python/pip \
+ dev-python/setuptools \
+ dev-python/wheel \
+ net-nds/openldap \
+ \
+ app-portage/eix \
+ app-portage/gentoolkit \
+ app-portage/layman \
+ net-analyzer/rrdtool \
+ sys-apps/portage \
+ && \
+ rm -f /var/cache/distfiles/*
+
+ENV PATH=/root/.local/bin/:${PATH}
+COPY requirements.txt /tmp/euscan/
+RUN pip2 install --user -r /tmp/euscan/requirements.txt
+
+COPY setup.py README.rst /tmp/euscan/
+COPY bin/ /tmp/euscan/bin/
+COPY pym/ /tmp/euscan/pym/
+
+WORKDIR /tmp/euscan/
+RUN pip2 install --user .
+
+RUN pip2 check
+RUN bash -c 'diff -U0 <(pip2 freeze --user | sed "/^\(euscan\|virtualenv\)==/d" | sort -f) <(sed -e "s/ *#.*//" -e "/^$/d" /tmp/euscan/requirements.txt | sort -f)'
+
+COPY euscanwww/ /tmp/euscan/euscanwww/
+
+COPY docker-entrypoint.sh /root/
+
+WORKDIR /tmp/euscan/euscanwww/
+
+EXPOSE 55080
+ENTRYPOINT ["/root/docker-entrypoint.sh"]
+CMD []
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..4daf0e2
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,44 @@
+# Copyright 2020 Gentoo Authors
+# Licensed under the GNU General Public License v2
+
+version: "3"
+
+services:
+ runserver:
+ depends_on:
+ - celeryd
+ image: ${COMPOSE_PROJECT_NAME}_celeryd:latest
+ environment:
+ DJANGO_SETTINGS_MODULE: euscanwww.settings
+ EUSCAN_SECRET_KEY: ${EUSCAN_SECRET_KEY:?}
+ volumes:
+ - "./euscanwww/:/tmp/euscan/euscanwww/"
+ - "./pym/euscan/:/root/.local/lib64/python2.7/site-packages/euscan"
+ ports:
+ - "127.0.0.1:55080:55080"
+ tty: true
+
+ celerycam:
+ depends_on:
+ - celeryd
+ image: ${COMPOSE_PROJECT_NAME}_celeryd:latest
+ environment:
+ DJANGO_SETTINGS_MODULE: euscanwww.settings
+ EUSCAN_SECRET_KEY: ${EUSCAN_SECRET_KEY:?}
+ volumes:
+ - "./euscanwww/:/tmp/euscan/euscanwww/"
+ - "./pym/euscan/:/root/.local/lib64/python2.7/site-packages/euscan"
+ command: python2 manage.py celerycam
+ tty: true
+
+ celeryd:
+ build:
+ context: .
+ environment:
+ DJANGO_SETTINGS_MODULE: euscanwww.settings
+ EUSCAN_SECRET_KEY: ${EUSCAN_SECRET_KEY:?}
+ volumes:
+ - "./euscanwww/:/tmp/euscan/euscanwww/"
+ - "./pym/euscan/:/root/.local/lib64/python2.7/site-packages/euscan"
+ command: python2 manage.py celeryd -B -E -l INFO
+ tty: true
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
new file mode 100755
index 0000000..4d27768
--- /dev/null
+++ b/docker-entrypoint.sh
@@ -0,0 +1,20 @@
+#! /usr/bin/env bash
+# Copyright 2020 Gentoo Authors
+# Licensed under the GNU General Public License v2
+
+set -e
+set -u
+
+PS4='# '
+set -x
+
+id
+ip addr
+
+if [[ $# -gt 0 ]]; then
+ exec "$@"
+fi
+
+python2 manage.py migrate
+
+exec python2 manage.py runserver 0.0.0.0:55080
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..cde5aa8
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,41 @@
+# Direct dependencies (testing)
+factory-boy==1.1.3
+
+# Direct dependencies (command line utility)
+BeautifulSoup==3.2.1
+
+# Direct dependencies (web interface)
+ansi2html==0.9.1
+Django==1.8
+django-annoying==0.10.4
+django-auth-ldap==1.1
+django-celery==3.3.1
+django-piston==0.2.3
+django-recaptcha==0.0.4
+django-registration==2.4.1
+matplotlib==2.2.5
+python-ldap==2.4.10
+
+# Indirect dependencies
+anyjson==0.3.3
+amqp==1.4.9 # <2.0 due to kombu 3.0.37
+backports.functools-lru-cache==1.6.1
+billiard==3.3.0.23 # <3.4 due to celery==3.1.25
+celery==3.1.25 # >=4 does not have celery.utils.timeutils
+configparser==4.0.2
+confusable-homoglyphs==3.2.0
+contextlib2==0.6.0.post1
+cycler==0.10.0
+importlib-metadata==1.5.0
+kiwisolver==1.1.0
+kombu==3.0.37 # <3.1 due to celery==3.1.25
+numpy==1.16.6
+pathlib2==2.3.5
+pyparsing==2.4.6
+python-dateutil==2.8.1
+pytz==2019.3
+scandir==1.10.0
+six==1.14.0
+subprocess32==3.5.4
+vine==1.3.0
+zipp==1.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-02-09 23:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-09 23:16 [gentoo-commits] proj/euscan:docker-compose--wip--expect-force-pushes commit in: / Sebastian Pipping
-- strict thread matches above, loose matches on Subject: below --
2020-02-09 23:16 Sebastian Pipping
2020-02-09 21:25 Sebastian Pipping
2020-02-09 18:14 Sebastian Pipping
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox