minor changes to docker container
This commit is contained in:
parent
dd07f2ecf0
commit
ccb9cf1631
31
Dockerfile
31
Dockerfile
|
@ -1,23 +1,20 @@
|
|||
FROM python:3.8-slim
|
||||
|
||||
WORKDIR /app
|
||||
COPY Pipfile Pipfile.lock /app/
|
||||
|
||||
RUN set -xe \
|
||||
pip install pipenv \
|
||||
&& apt-get update -q \
|
||||
RUN apt-get update -q \
|
||||
&& apt-get install -y -q \
|
||||
gcc python3-dev libssl-dev \
|
||||
curl postgresql-client git-core \
|
||||
gunicorn3 postgresql-client
|
||||
|
||||
RUN set -xe \
|
||||
pipenv install --dev \
|
||||
&& apt-get remove -y gcc python3-dev libssl-dev \
|
||||
&& apt-get autoremove -y \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& useradd _gunicorn --no-create-home --user-group
|
||||
gcc \
|
||||
libssl-dev \
|
||||
curl \
|
||||
postgresql-client \
|
||||
gunicorn3
|
||||
RUN useradd _gunicorn --no-create-home --user-group
|
||||
|
||||
COPY . /app/
|
||||
WORKDIR /app
|
||||
|
||||
RUN chmod +x "/app/docker_run.sh" \
|
||||
&& pip install pipenv \
|
||||
&& pipenv install --dev --deploy --system --ignore-pipfile
|
||||
|
||||
ENTRYPOINT ["/app/docker_run.sh"]
|
||||
|
||||
|
|
2
Pipfile
2
Pipfile
|
@ -26,12 +26,12 @@ marshmallow-enum = "*"
|
|||
marshmallow-sqlalchemy = "*"
|
||||
sentry-sdk = {extras = ["flask"],version = "==0.14.4"}
|
||||
swagger-ui-bundle = "*"
|
||||
spiffworkflow = {git = "https://github.com/sartography/SpiffWorkflow.git",ref = "master"}
|
||||
webtest = "*"
|
||||
python-box = "*"
|
||||
psycopg2-binary = "*"
|
||||
google-cloud-firestore = "*"
|
||||
globus-sdk = "*"
|
||||
gunicorn = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.8"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "088457a63c637e71582d594acf34d6fa3eccf097f07298c0cb1505b59d0f7783"
|
||||
"sha256": "d21912b50ed403a1436f4eb9feed3facedea30b4c9e887620d7e8359e1cdba88"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
|
@ -385,6 +385,14 @@
|
|||
],
|
||||
"version": "==1.32.0"
|
||||
},
|
||||
"gunicorn": {
|
||||
"hashes": [
|
||||
"sha256:1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626",
|
||||
"sha256:cd4a810dd51bf497552cf3f863b575dabd73d6ad6a91075b65936b151cbf4f9c"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==20.0.4"
|
||||
},
|
||||
"idna": {
|
||||
"hashes": [
|
||||
"sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6",
|
||||
|
@ -392,14 +400,6 @@
|
|||
],
|
||||
"version": "==2.10"
|
||||
},
|
||||
"importlib-metadata": {
|
||||
"hashes": [
|
||||
"sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83",
|
||||
"sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"
|
||||
],
|
||||
"markers": "python_version < '3.8'",
|
||||
"version": "==1.7.0"
|
||||
},
|
||||
"inflection": {
|
||||
"hashes": [
|
||||
"sha256:1a29730d366e996aaacffb2f1f1cb9593dc38e2ddd30c91250c6dde09ea9b417",
|
||||
|
@ -731,10 +731,6 @@
|
|||
],
|
||||
"version": "==2.0.1"
|
||||
},
|
||||
"spiffworkflow": {
|
||||
"git": "https://github.com/sartography/SpiffWorkflow.git",
|
||||
"ref": "5b379f33d8eba9383ee26050b14a79c6f7a2a1ba"
|
||||
},
|
||||
"sqlalchemy": {
|
||||
"hashes": [
|
||||
"sha256:072766c3bd09294d716b2d114d46ffc5ccf8ea0b714a4e1c48253014b771c6bb",
|
||||
|
@ -822,13 +818,6 @@
|
|||
"sha256:81195de0ac94fbc8368abbaf9197b88c4f3ffd6c2719b5bf5fc9da744f3d829c"
|
||||
],
|
||||
"version": "==2.3.3"
|
||||
},
|
||||
"zipp": {
|
||||
"hashes": [
|
||||
"sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b",
|
||||
"sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96"
|
||||
],
|
||||
"version": "==3.1.0"
|
||||
}
|
||||
},
|
||||
"develop": {
|
||||
|
@ -879,14 +868,6 @@
|
|||
"index": "pypi",
|
||||
"version": "==5.3"
|
||||
},
|
||||
"importlib-metadata": {
|
||||
"hashes": [
|
||||
"sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83",
|
||||
"sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"
|
||||
],
|
||||
"markers": "python_version < '3.8'",
|
||||
"version": "==1.7.0"
|
||||
},
|
||||
"iniconfig": {
|
||||
"hashes": [
|
||||
"sha256:80cf40c597eb564e86346103f609d74efce0f6b4d4f30ec8ce9e2c26411ba437",
|
||||
|
@ -958,13 +939,6 @@
|
|||
"sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88"
|
||||
],
|
||||
"version": "==0.10.1"
|
||||
},
|
||||
"zipp": {
|
||||
"hashes": [
|
||||
"sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b",
|
||||
"sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96"
|
||||
],
|
||||
"version": "==3.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,12 @@ if [ "$RESET_DB" = "true" ]; then
|
|||
fi
|
||||
|
||||
# THIS MUST BE THE LAST COMMAND!
|
||||
if [ -z "$PORT0" ]
|
||||
then
|
||||
echo "$PORT0 is not set, setting to 5000"
|
||||
PORT0=5000
|
||||
fi
|
||||
|
||||
if [ "$APPLICATION_ROOT" = "/" ]; then
|
||||
pipenv run gunicorn --bind 0.0.0.0:$PORT0 wsgi:app
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue