docker(minor): switch to debian based image so we can use wheels
This commit is contained in:
parent
dc8d8dd2b6
commit
a48924c896
2
Pipfile
2
Pipfile
|
@ -6,7 +6,6 @@ verify_ssl = true
|
||||||
[packages]
|
[packages]
|
||||||
celery = "*"
|
celery = "*"
|
||||||
cherrypy = "*"
|
cherrypy = "*"
|
||||||
colorlog = "*"
|
|
||||||
defusedxml = "*"
|
defusedxml = "*"
|
||||||
django = "*"
|
django = "*"
|
||||||
django-cors-middleware = "*"
|
django-cors-middleware = "*"
|
||||||
|
@ -36,7 +35,6 @@ service_identity = "*"
|
||||||
signxml = "*"
|
signxml = "*"
|
||||||
urllib3 = {extras = ["secure"],version = "*"}
|
urllib3 = {extras = ["secure"],version = "*"}
|
||||||
structlog = "*"
|
structlog = "*"
|
||||||
uwsgi = "*"
|
|
||||||
|
|
||||||
[requires]
|
[requires]
|
||||||
python_version = "3.7"
|
python_version = "3.7"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"hash": {
|
"hash": {
|
||||||
"sha256": "ed6099cb01ff4d6dd62131fa60476f0ce3071dfa5ebd2475b95c2d782d1c7727"
|
"sha256": "d03d1e494d28a90b39edd1d489afdb5e39ec09bceb18daa2a54b2cc7de61d83c"
|
||||||
},
|
},
|
||||||
"pipfile-spec": 6,
|
"pipfile-spec": 6,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -114,14 +114,6 @@
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"version": "==18.3.0"
|
"version": "==18.3.0"
|
||||||
},
|
},
|
||||||
"colorlog": {
|
|
||||||
"hashes": [
|
|
||||||
"sha256:3cf31b25cbc8f86ec01fef582ef3b840950dea414084ed19ab922c8b493f9b42",
|
|
||||||
"sha256:450f52ea2a2b6ebb308f034ea9a9b15cea51e65650593dca1da3eb792e4e4981"
|
|
||||||
],
|
|
||||||
"index": "pypi",
|
|
||||||
"version": "==4.0.2"
|
|
||||||
},
|
|
||||||
"coreapi": {
|
"coreapi": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:46145fcc1f7017c076a2ef684969b641d18a2991051fddec9458ad3f78ffc1cb",
|
"sha256:46145fcc1f7017c076a2ef684969b641d18a2991051fddec9458ad3f78ffc1cb",
|
||||||
|
@ -731,13 +723,6 @@
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"version": "==1.25.6"
|
"version": "==1.25.6"
|
||||||
},
|
},
|
||||||
"uwsgi": {
|
|
||||||
"hashes": [
|
|
||||||
"sha256:4972ac538800fb2d421027f49b4a1869b66048839507ccf0aa2fda792d99f583"
|
|
||||||
],
|
|
||||||
"index": "pypi",
|
|
||||||
"version": "==2.0.18"
|
|
||||||
},
|
|
||||||
"vine": {
|
"vine": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:133ee6d7a9016f177ddeaf191c1f58421a1dcc6ee9a42c58b34bed40e1d2cd87",
|
"sha256:133ee6d7a9016f177ddeaf191c1f58421a1dcc6ee9a42c58b34bed40e1d2cd87",
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
FROM python:3.7-alpine
|
FROM python:3.7-slim-stretch
|
||||||
|
|
||||||
COPY ./Pipfile /app/
|
COPY ./Pipfile /app/
|
||||||
COPY ./Pipfile.lock /app/
|
COPY ./Pipfile.lock /app/
|
||||||
|
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apt-get update && \
|
||||||
apk add --no-cache openssl-dev build-base libxml2-dev libxslt-dev libffi-dev gcc musl-dev libgcc zlib-dev postgresql-dev && \
|
apt-get install -y --no-install-recommends build-essential && \
|
||||||
pip install pipenv --no-cache-dir && \
|
pip install pipenv uwsgi --no-cache-dir && \
|
||||||
pipenv lock -r > requirements.txt && \
|
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 && \
|
pipenv --rm && \
|
||||||
pip install -r requirements.txt --no-cache-dir && \
|
pip install -r requirements.txt --no-cache-dir && \
|
||||||
adduser -S passbook && \
|
adduser --system --no-create-home passbook && \
|
||||||
chown -R passbook /app
|
chown -R passbook /app
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
FROM docker.beryju.org/passbook/base:latest
|
FROM docker.beryju.org/passbook/base:latest
|
||||||
|
|
||||||
RUN pipenv lock --dev -r > requirements-dev.txt && \
|
RUN pipenv lock --dev -r > requirements-dev.txt && \
|
||||||
|
pipenv --rm && \
|
||||||
pip install -r /app/requirements-dev.txt --no-cache-dir
|
pip install -r /app/requirements-dev.txt --no-cache-dir
|
||||||
|
|
|
@ -319,3 +319,10 @@ for _app in INSTALLED_APPS:
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
INSTALLED_APPS.append('debug_toolbar')
|
INSTALLED_APPS.append('debug_toolbar')
|
||||||
MIDDLEWARE.append('debug_toolbar.middleware.DebugToolbarMiddleware')
|
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'
|
||||||
|
}
|
||||||
|
|
|
@ -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 ./passbook/ /app/passbook
|
||||||
COPY ./manage.py /app/
|
COPY ./manage.py /app/
|
||||||
|
|
Reference in New Issue