Skip to content

Commit

Permalink
Merge pull request #231 from deniszh/no-venv
Browse files Browse the repository at this point in the history
Preparing for 1.1.11
  • Loading branch information
deniszh authored Aug 25, 2024
2 parents 2ffaebf + e3d76ab commit ef06117
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 19 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: monthly
- package-ecosystem: docker
directory: "/"
schedule:
interval: weekly
time: '10:00'
open-pull-requests-limit: 10
30 changes: 16 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASEIMAGE=alpine:3.15
ARG BASEIMAGE=alpine:3
FROM $BASEIMAGE as base
LABEL maintainer="Denys Zhdanov <[email protected]>"
LABEL org.opencontainers.image.source https://github.com/graphite-project/docker-graphite-statsd
Expand Down Expand Up @@ -49,6 +49,7 @@ ENV PYTHONDONTWRITEBYTECODE=1
RUN true \
&& apk add --update \
alpine-sdk \
curl \
git \
pkgconfig \
wget \
Expand All @@ -62,16 +63,14 @@ RUN true \
librdkafka-dev \
mysql-dev \
postgresql-dev \
&& curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py \
&& python3 /tmp/get-pip.py pip==20.1.1 setuptools==50.3.2 wheel==0.35.1 && rm /tmp/get-pip.py \
&& pip install virtualenv==16.7.10 \
py3-pip py3-setuptools py3-wheel py3-virtualenv \
&& virtualenv -p python3 /opt/graphite \
&& . /opt/graphite/bin/activate \
&& echo 'INPUT ( libldap.so )' > /usr/lib/libldap_r.so \
&& pip install \
cairocffi==1.1.0 \
django==3.2.20 \
django-tagging==0.4.3 \
django==4.2.15 \
django-tagging==0.5.0 \
django-statsd-mozilla \
fadvise \
gunicorn==20.1.0 \
Expand All @@ -83,20 +82,22 @@ RUN true \
python-ldap \
mysqlclient \
psycopg2==2.8.6 \
django-cockroachdb==3.2.*
django-cockroachdb==4.2.*

ARG version=1.1.10
ARG version=1.1.11

# install whisper
ARG whisper_version=${version}
#ARG whisper_version=${version}
ARG whisper_version=master
ARG whisper_repo=https://github.com/graphite-project/whisper.git
RUN git clone -b ${whisper_version} --depth 1 ${whisper_repo} /usr/local/src/whisper \
&& cd /usr/local/src/whisper \
&& . /opt/graphite/bin/activate \
&& python3 ./setup.py install $python_extra_flags

# install carbon
ARG carbon_version=${version}
#ARG carbon_version=${version}
ARG carbon_version=master
ARG carbon_repo=https://github.com/graphite-project/carbon.git
RUN . /opt/graphite/bin/activate \
&& git clone -b ${carbon_version} --depth 1 ${carbon_repo} /usr/local/src/carbon \
Expand All @@ -105,7 +106,8 @@ RUN . /opt/graphite/bin/activate \
&& python3 ./setup.py install $python_extra_flags

# install graphite
ARG graphite_version=${version}
#ARG graphite_version=${version}
ARG graphite_version=master
ARG graphite_repo=https://github.com/graphite-project/graphite-web.git
RUN . /opt/graphite/bin/activate \
&& git clone -b ${graphite_version} --depth 1 ${graphite_repo} /usr/local/src/graphite-web \
Expand All @@ -114,7 +116,7 @@ RUN . /opt/graphite/bin/activate \
&& python3 ./setup.py install $python_extra_flags

# install statsd
ARG statsd_version=0.10.1
ARG statsd_version=0.10.2
ARG statsd_repo=https://github.com/statsd/statsd.git
WORKDIR /opt
RUN git clone "${statsd_repo}" \
Expand All @@ -124,7 +126,7 @@ RUN git clone "${statsd_repo}" \

# build go-carbon (optional)
# https://github.com/go-graphite/go-carbon/pull/340
ARG gocarbon_version=0.17.1
ARG gocarbon_version=0.17.3
ARG gocarbon_repo=https://github.com/go-graphite/go-carbon.git
RUN git clone "${gocarbon_repo}" /usr/local/src/go-carbon \
&& cd /usr/local/src/go-carbon \
Expand Down Expand Up @@ -152,7 +154,7 @@ COPY conf/opt/graphite/conf/* /opt/graphite/conf/
COPY conf/opt/graphite/webapp/graphite/local_settings.py /opt/graphite/webapp/graphite/local_settings.py
WORKDIR /opt/graphite/webapp
RUN mkdir -p /var/log/graphite/ \
&& PYTHONPATH=/opt/graphite/webapp /opt/graphite/bin/django-admin.py collectstatic --noinput --settings=graphite.settings
&& PYTHONPATH=/opt/graphite/webapp /opt/graphite/bin/django-admin collectstatic --noinput --settings=graphite.settings

# config statsd
COPY conf/opt/statsd/config/ /opt/defaultconf/statsd/config/
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
VERSION=1.1.10-5
VERSION=1.1.11-rc0
docker build . \
--build-arg python_extra_flags="--single-version-externally-managed --root=/" \
--no-cache --tag graphiteapp/graphite-statsd:$VERSION --progress tty
6 changes: 3 additions & 3 deletions conf/etc/service/graphite/run
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ BIN=/opt/graphite/bin/python3

export PYTHONPATH=/opt/graphite/webapp
export DJANGO_SETTINGS_MODULE=graphite.settings
${BIN} /opt/graphite/bin/django-admin.py makemigrations
${BIN} /opt/graphite/bin/django-admin.py migrate auth
${BIN} /opt/graphite/bin/django-admin.py migrate --run-syncdb
${BIN} /opt/graphite/bin/django-admin makemigrations
${BIN} /opt/graphite/bin/django-admin migrate auth
${BIN} /opt/graphite/bin/django-admin migrate --run-syncdb
/opt/graphite/bin/django_admin_init.sh || true

if folder_empty /opt/graphite/webapp/graphite/functions/custom; then
Expand Down
2 changes: 1 addition & 1 deletion conf/opt/graphite/bin/django_admin_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
BIN=/opt/graphite/bin/python3
[[ -f "/opt/graphite/bin/pypy3" ]] && BIN=/opt/graphite/bin/pypy3

cat <<EOF | ${BIN} /opt/graphite/bin/django-admin.py shell
cat <<EOF | ${BIN} /opt/graphite/bin/django-admin shell
from django.contrib.auth import get_user_model
User = get_user_model() # get the currently active user model
Expand Down

0 comments on commit ef06117

Please sign in to comment.