-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (43 loc) · 1.17 KB
/
Dockerfile
File metadata and controls
52 lines (43 loc) · 1.17 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# use this as the base image
FROM ubuntu:14.04
# maintainer information
MAINTAINER Ricardo Lobo <ricardolobo@audienciazero.org>
# by default we are in development mode
# this is set with app_in_production env var
ENV APP_IN_PRODUCTION=false
ENV SECRET_KEY=alwayskeepyourkeysecret
# install packages
RUN apt-get update && \
apt-get -y install \
python3-pip \
python3-dev \
nginx \
supervisor \
wget \
sqlite3
# install pillow dependencies, pillow is
# required by django's imagefield
# following official basic installation
# http://pillow.readthedocs.org/en/3.0.x/installation.html#basic-installation
RUN apt-get -y install \
libtiff5-dev \
libjpeg8-dev \
zlib1g-dev \
libfreetype6-dev \
liblcms2-dev \
libwebp-dev \
tcl8.6-dev \
tk8.6-dev \
python-tk
# copy django project
ADD . /var/www/boxing-api
WORKDIR /var/www/boxing-api
# install python dependencies using pip3
RUN pip3 install -r requirements.txt
# set locale to european portuguese
RUN locale-gen pt_PT.UTF-8
# make initialize script executable
RUN chmod ug+x /var/www/boxing-api/initialize.sh
# supervisor configuration
COPY dist/common/supervisor/boxing.conf /etc/supervisor/conf.d/boxing.conf
CMD ["/usr/bin/supervisord"]