docker(minor): switch to debian based image so we can use wheels

This commit is contained in:
Langhammer, Jens 2019-10-04 11:50:52 +02:00
parent dc8d8dd2b6
commit a48924c896
6 changed files with 20 additions and 25 deletions

View File

@ -6,7 +6,6 @@ verify_ssl = true
[packages]
celery = "*"
cherrypy = "*"
colorlog = "*"
defusedxml = "*"
django = "*"
django-cors-middleware = "*"
@ -36,7 +35,6 @@ service_identity = "*"
signxml = "*"
urllib3 = {extras = ["secure"],version = "*"}
structlog = "*"
uwsgi = "*"
[requires]
python_version = "3.7"

17
Pipfile.lock generated
View File

@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "ed6099cb01ff4d6dd62131fa60476f0ce3071dfa5ebd2475b95c2d782d1c7727"
"sha256": "d03d1e494d28a90b39edd1d489afdb5e39ec09bceb18daa2a54b2cc7de61d83c"
},
"pipfile-spec": 6,
"requires": {
@ -114,14 +114,6 @@
"index": "pypi",
"version": "==18.3.0"
},
"colorlog": {
"hashes": [
"sha256:3cf31b25cbc8f86ec01fef582ef3b840950dea414084ed19ab922c8b493f9b42",
"sha256:450f52ea2a2b6ebb308f034ea9a9b15cea51e65650593dca1da3eb792e4e4981"
],
"index": "pypi",
"version": "==4.0.2"
},
"coreapi": {
"hashes": [
"sha256:46145fcc1f7017c076a2ef684969b641d18a2991051fddec9458ad3f78ffc1cb",
@ -731,13 +723,6 @@
"index": "pypi",
"version": "==1.25.6"
},
"uwsgi": {
"hashes": [
"sha256:4972ac538800fb2d421027f49b4a1869b66048839507ccf0aa2fda792d99f583"
],
"index": "pypi",
"version": "==2.0.18"
},
"vine": {
"hashes": [
"sha256:133ee6d7a9016f177ddeaf191c1f58421a1dcc6ee9a42c58b34bed40e1d2cd87",

View File

@ -1,15 +1,19 @@
FROM python:3.7-alpine
FROM python:3.7-slim-stretch
COPY ./Pipfile /app/
COPY ./Pipfile.lock /app/
WORKDIR /app/
RUN apk update && \
apk add --no-cache openssl-dev build-base libxml2-dev libxslt-dev libffi-dev gcc musl-dev libgcc zlib-dev postgresql-dev && \
pip install pipenv --no-cache-dir && \
pipenv lock -r > requirements.txt && \
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential && \
pip install pipenv uwsgi --no-cache-dir && \
apt-get remove -y --purge build-essential && \
apt-get autoremove -y --purge && \
rm -rf /var/lib/apt/lists/*
RUN pipenv lock -r > requirements.txt && \
pipenv --rm && \
pip install -r requirements.txt --no-cache-dir && \
adduser -S passbook && \
adduser --system --no-create-home passbook && \
chown -R passbook /app

View File

@ -1,4 +1,5 @@
FROM docker.beryju.org/passbook/base:latest
RUN pipenv lock --dev -r > requirements-dev.txt && \
pipenv --rm && \
pip install -r /app/requirements-dev.txt --no-cache-dir

View File

@ -319,3 +319,10 @@ for _app in INSTALLED_APPS:
if DEBUG:
INSTALLED_APPS.append('debug_toolbar')
MIDDLEWARE.append('debug_toolbar.middleware.DebugToolbarMiddleware')
DBBACKUP_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
DBBACKUP_STORAGE_OPTIONS = {
'access_key': 'my_id',
'secret_key': 'my_secret',
'bucket_name': 'my_bucket_name'
}

View File

@ -1,4 +1,4 @@
FROM docker.beryju.org/passbook/dev as static-build
FROM docker.beryju.org/passbook/dev:latest as static-build
COPY ./passbook/ /app/passbook
COPY ./manage.py /app/