forked from fedspendingtransparency/usaspending-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (20 loc) · 811 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Basic Dockerfile for the USASpendingAPI
## 0) Add your DATABASE_URL on the ENV line below
## 1) Build:
# docker build . -t usaspendingapi
## 2) Run (include -p flag and ports)
# docker run -p 127.0.0.1:8000:8000 usaspendingapi
# This will forward port 8000 of the container to your localhost:8000 and start a new container for the API.
# Rebuild and run when code in /usaspending-api changes
FROM python:3.5.3
WORKDIR /dockermount
RUN apt-get update -y
RUN apt-get install -y \
memcached \
libmemcached-dev
ADD requirements/requirements.txt /dockermount/requirements/requirements.txt
RUN pip install -r requirements/requirements.txt
ADD . /dockermount
ENV DATABASE_URL postgres://user@database_info:5432/db_name
EXPOSE 8000
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]