Commit f7c54254 authored by Jorge S. Mendes de Jesus's avatar Jorge S. Mendes de Jesus
Browse files

Docker clean up

parent 04088c8b
Pipeline #24757 failed with stage
in 15 seconds
monoliths
wsm.rest.env
wsm.rest.sock
tools
.git
.gitgnore
.project
.pydevproject
*/*.pyc
__pycache__
\ No newline at end of file
#VSCode and Eclipse
.vscode
*.code-workspace
.project
.pydevproject
# Local History for Visual Studio Code
.history/
# Local envs
.env
# Application Specific
monoliths
*.pyc
app.log
wsm.rest.env
wsm.rest.sock
logs
.project
.pydevproject
.vscode
\ No newline at end of file
# Python
__pycache__
......@@ -29,72 +29,14 @@ COPY . .
RUN pip install -r requirements.txt
# Clean up
RUN pip cache purge \
&& apt remove -y build-essential \
&& apt -y autoremove \
&& rm -rf /var/lib/apt/lists/*
USER www-data
EXPOSE 8000
ENTRYPOINT ["/usr/bin/tini","-g","--"]
CMD ["gunicorn","--bind","0.0.0.0","--workers","2","--threads","4","--worker-class","eventlet", "--log-file=-", "wsgi:app"]
# build-essential \
#RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# postgresql-client \
# build-essential \
# gdal-bin libgdal-dev libtbb2 tini
#WORKDIR /src
#RUN mkdir -p /soils
#COPY soils /soils/soils
#COPY requirements.txt /soils/requirements.txt
#COPY gunicorn.py /soils/gunicorn.py
#WORKDIR /soils
#RUN pip install -r requirements.txt
# Clean up
#RUN pip cache purge \
# && apt remove -y build-essential \
# && apt -y autoremove \
# && rm -rf /var/lib/apt/lists/*
#USER www-data
#EXPOSE 8000
#ENTRYPOINT ["/usr/bin/tini","-g","--"]
#CMD ["gunicorn","--config=./gunicorn.py", "soils:app"]
#FROM ubuntu:18.04
#LABEL MAINTAINER Luís de Sousa <luis.desousa@wur.nl>
#RUN apt update && apt -y install python-pip python-dev nginx curl && rm -rf /var/lib/apt/lists/*
#RUN mkdir -p /var/www/wsm.rest
#WORKDIR /var/www/wsm.rest
#COPY . .
#RUN chmod +x configs/startup.sh
#RUN pip install -r requirements.txt
#ENTRYPOINT [ "configs/startup.sh" ]
#EXPOSE 80
#STOPSIGNAL SIGQUIT
#HEALTHCHECK CMD curl --fail http://localhost:80 || exit 1
#CMD ["nginx", "-g", "daemon off;"]
################### Usage #####################
# Build it
# docker build -t ldesousa/wsm.rest .
# Set the correct database connection in using environment variables or an env-file:
# Run command with envfile
# docker run -dit --env-file /path/to/envfile -v /data/monoliths:/data/monoliths --name wsm.rest -p 8081:80 ldesousa/wsm.rest
# Declaring variables inline:
# docker run -dit -e DB_HOST=scomp1270.wurnet.nl -e DB_NAME=isric -e DB_USER=haas005 -e DB_PASSWORD=wur -e DB_PORT=5479 -v /data/monoliths:/data/monoliths --name wsm.rest -p 8081:80 ldesousa/wsm.rest
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