Skip to content

Commit

Permalink
Update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLemayian committed Jan 13, 2019
1 parent a26cfd2 commit d39153c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
@@ -1,4 +1,5 @@
FROM python:2.7.13
FROM python:2.7
ENV DEBIAN_FRONTEND noninteractive

COPY . /htools-api

Expand All @@ -7,4 +8,6 @@ WORKDIR /htools-api
RUN pip install --upgrade pip
RUN pip install -r requirements.txt

CMD ["gunicorn", "healthtools.manage:app"]
EXPOSE 8000

CMD ["gunicorn", "--workers=2", "--bind=0.0.0.0:8000", "healthtools.manage:app"]
29 changes: 29 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,29 @@
version: "3.7"

services:
elasticsearch:
image: elasticsearch:5.6.10
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
environment:
ES_JAVA_OPTS: -Xms512m -Xmx512m

memcached:
image: memcached:1.5

web:
build: .
ports:
- "8000:8000"
depends_on:
- elasticsearch
- memcached
volumes:
- "./:/htools-api"
environment:
- PYTHONDONTWRITEBYTECODE="True"
- HTOOLS_ES_HOST=elasticsearch
- HTOOLS_MEMCACHED_URL=memcached:11211

volumes:
elasticsearch-data: {}
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -12,7 +12,7 @@ emoji==0.5.0
enum34==1.1.6
Flask==0.12.2
Flask-Cors==3.0.4
futures==3.2.0
futures==3.1.1
gunicorn==19.7.1
idna==2.6
isort==4.3.4
Expand Down

0 comments on commit d39153c

Please sign in to comment.