diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..886e07b --- /dev/null +++ b/.github/dependabot.yml @@ -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 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 95214c4..1388f3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG BASEIMAGE=alpine:3.15 +ARG BASEIMAGE=alpine:3 FROM $BASEIMAGE as base LABEL maintainer="Denys Zhdanov " LABEL org.opencontainers.image.source https://github.com/graphite-project/docker-graphite-statsd @@ -49,6 +49,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 RUN true \ && apk add --update \ alpine-sdk \ + curl \ git \ pkgconfig \ wget \ @@ -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 \ @@ -83,12 +82,13 @@ 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 \ @@ -96,7 +96,8 @@ RUN git clone -b ${whisper_version} --depth 1 ${whisper_repo} /usr/local/src/whi && 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 \ @@ -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 \ @@ -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}" \ @@ -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 \ @@ -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/ diff --git a/build.sh b/build.sh index 2a1c657..e297110 100755 --- a/build.sh +++ b/build.sh @@ -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 \ No newline at end of file diff --git a/conf/etc/service/graphite/run b/conf/etc/service/graphite/run index 4e04a79..41c241f 100755 --- a/conf/etc/service/graphite/run +++ b/conf/etc/service/graphite/run @@ -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 diff --git a/conf/opt/graphite/bin/django_admin_init.sh b/conf/opt/graphite/bin/django_admin_init.sh index c6997de..53bcaf3 100755 --- a/conf/opt/graphite/bin/django_admin_init.sh +++ b/conf/opt/graphite/bin/django_admin_init.sh @@ -3,7 +3,7 @@ BIN=/opt/graphite/bin/python3 [[ -f "/opt/graphite/bin/pypy3" ]] && BIN=/opt/graphite/bin/pypy3 -cat <