Add Docker setup for lightweight local testing
This commit is contained in:
parent
f2db400ed8
commit
aa2b87682f
4 changed files with 57 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -43,3 +43,4 @@ _build/
|
||||||
*.sqlite3
|
*.sqlite3
|
||||||
.vagrant/
|
.vagrant/
|
||||||
.idea/
|
.idea/
|
||||||
|
.env
|
||||||
|
|
45
Dockerfile
Normal file
45
Dockerfile
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
ARG DEBIAN_RELEASE=buster
|
||||||
|
FROM debian:$DEBIAN_RELEASE
|
||||||
|
LABEL maintainer="Jan Dittberner <jan@dittberner.info>"
|
||||||
|
|
||||||
|
ENV LC_ALL=C.UTF-8
|
||||||
|
ENV LANG=C.UTF-8
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
dumb-init \
|
||||||
|
gettext \
|
||||||
|
git \
|
||||||
|
python3-dev \
|
||||||
|
python3-pip \
|
||||||
|
python3-setuptools \
|
||||||
|
python3-virtualenv \
|
||||||
|
python3-wheel \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*.*
|
||||||
|
|
||||||
|
RUN python3 -m pip install --prefix=/usr/local pipenv
|
||||||
|
|
||||||
|
ARG GVAGID=2000
|
||||||
|
ARG GVAUID=2000
|
||||||
|
|
||||||
|
ARG GVAAPP=gvafile
|
||||||
|
|
||||||
|
WORKDIR /srv/$GVAAPP
|
||||||
|
|
||||||
|
COPY Pipfile Pipfile.lock /srv/$GVAAPP/
|
||||||
|
|
||||||
|
RUN addgroup --gid $GVAGID $GVAAPP ; \
|
||||||
|
adduser --home /home/$GVAAPP --shell /bin/bash --uid $GVAUID --gid $GVAGID --disabled-password --gecos "User for gnuviechadmin component $GVAAPP" $GVAAPP
|
||||||
|
|
||||||
|
USER $GVAAPP
|
||||||
|
RUN python3 -m virtualenv --python=python3 /home/$GVAAPP/$GVAAPP-venv ; \
|
||||||
|
/home/$GVAAPP/$GVAAPP-venv/bin/python3 -m pip install -U pip ; \
|
||||||
|
VIRTUAL_ENV=/home/$GVAAPP/$GVAAPP-venv pipenv install --deploy --ignore-pipfile --dev
|
||||||
|
|
||||||
|
VOLUME /srv/$GVAAPP
|
||||||
|
|
||||||
|
COPY gvafile.sh /srv/
|
||||||
|
|
||||||
|
ENTRYPOINT ["dumb-init", "/srv/gvafile.sh"]
|
|
@ -1,11 +1,15 @@
|
||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
* :support:`-` add Docker setup for lightweight local testing
|
||||||
* :support:`-` update Vagrant setup to libvirt and Debian Buster
|
* :support:`-` update Vagrant setup to libvirt and Debian Buster
|
||||||
* :support:`-` move fileservertasks to top level to keep the task names when
|
* :support:`-` move fileservertasks to top level to keep the task names when
|
||||||
using Python 3
|
using Python 3
|
||||||
* :support:`2` use Pipenv for dependency management
|
* :support:`2` use Pipenv for dependency management
|
||||||
|
|
||||||
|
* :release:`0.5.1 <>`
|
||||||
|
* :bug:`-` change dependency URLs
|
||||||
|
|
||||||
* :release:`0.5.0 <2015-01-29>`
|
* :release:`0.5.0 <2015-01-29>`
|
||||||
* :feature:`-` add new task set_file_ssh_authorized_keys to add SSH keys for
|
* :feature:`-` add new task set_file_ssh_authorized_keys to add SSH keys for
|
||||||
users
|
users
|
||||||
|
|
7
gvafile.sh
Executable file
7
gvafile.sh
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. /home/gvafile/gvafile-venv/bin/activate
|
||||||
|
cd /srv/gvafile/gvafile
|
||||||
|
celery -A fileservertasks worker -Q file -l info
|
Loading…
Reference in a new issue