Commit 6a1155cf authored by Aljaž Srebrnič's avatar Aljaž Srebrnič

Fix docker build, add setup.py install

parent 0fc673a2
/frontend/node_modules
/frontend/build
Dockerfile
\ No newline at end of file
FROM python:3.7.2-alpine
FROM python:3-alpine
RUN apk add --no-cache npm gcc g++
RUN apk add --no-cache g++ npm py3-lxml linux-headers
WORKDIR /app
COPY . /app
COPY setup.py .
RUN pip3 install --upgrade pip && python setup.py install
COPY . .
# Install any needed packages specified in requirements.txt
RUN pip3 install --upgrade pip && pip3 install pipenv
RUN pipenv install
RUN cd frontend &&\
npm install &&\
npm audit fix &&\
......@@ -17,6 +18,4 @@ RUN cd frontend &&\
# Make port available to the world outside this container
EXPOSE 5000
ENV FLASK_APP m_ship
CMD ["pipenv", "run", "flask", "run", "--host", "0.0.0.0"]
CMD uwsgi --http-socket :5000 --manage-script-name --plugin python3 --mount /=wsgi:application
......@@ -8,6 +8,7 @@ flask = "*"
libsass = "*"
cssmin = "*"
fpdf = "*"
uwsgi = "*"
[dev-packages]
......
This diff is collapsed.
......@@ -8,5 +8,8 @@ setup(
zip_safe=False,
install_requires=[
'flask',
'libsass',
'cssmin',
'uwsgi'
],
)
\ No newline at end of file
#!/usr/bin/python3
from m_ship import create_app as application
if __name__ == "__main__":
application().run()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment