Introduced docker
This commit is contained in:
parent
7ae1313cf0
commit
2b886fe2f6
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
||||
FROM node:current-alpine
|
||||
COPY . /app/
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
RUN yarn install && yarn build && rm -rf node_modules
|
||||
|
||||
|
||||
FROM python:3-slim-buster
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
ENV DATABASE_URL sqlite:////data/app.db
|
||||
ENV FLASK_APP app
|
||||
ENV FLASK_DEBUG 0
|
||||
COPY ./requirements.txt /requirements.txt
|
||||
RUN apt-get update && \
|
||||
apt-get install -y gosu && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
pip install -r /requirements.txt && pip install gunicorn
|
||||
COPY --from=0 /app/ /app
|
||||
WORKDIR /app
|
||||
RUN flask digest compile
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "main:app"]
|
3
entrypoint.sh
Normal file
3
entrypoint.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
chown -R www-data:www-data /data
|
||||
flask db upgrade && gosu www-data "$@"
|
BIN
latin.sqlite
BIN
latin.sqlite
Binary file not shown.
34
requirements.txt
Normal file
34
requirements.txt
Normal file
@ -0,0 +1,34 @@
|
||||
appdirs==1.4.3
|
||||
CacheControl==0.12.6
|
||||
certifi==2019.11.28
|
||||
chardet==3.0.4
|
||||
click==7.1.2
|
||||
colorama==0.4.3
|
||||
contextlib2==0.6.0
|
||||
distlib==0.3.0
|
||||
distro==1.4.0
|
||||
Flask==1.1.2
|
||||
Flask-SQLAlchemy==2.4.4
|
||||
Flask-WTF==0.14.3
|
||||
gunicorn==20.0.4
|
||||
html5lib==1.0.1
|
||||
idna==2.8
|
||||
ipaddr==2.2.0
|
||||
itsdangerous==1.1.0
|
||||
Jinja2==2.11.2
|
||||
lockfile==0.12.2
|
||||
MarkupSafe==1.1.1
|
||||
msgpack==0.6.2
|
||||
packaging==20.3
|
||||
pep517==0.8.2
|
||||
progress==1.5
|
||||
pyparsing==2.4.6
|
||||
pytoml==0.1.21
|
||||
requests==2.22.0
|
||||
retrying==1.3.3
|
||||
six==1.14.0
|
||||
SQLAlchemy==1.3.19
|
||||
urllib3==1.25.8
|
||||
webencodings==0.5.1
|
||||
Werkzeug==1.0.1
|
||||
WTForms==2.3.3
|
Loading…
Reference in New Issue
Block a user