-
Notifications
You must be signed in to change notification settings - Fork 99
/
Dockerfile
37 lines (30 loc) · 1 KB
/
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
33
34
35
36
37
FROM python:3.6
LABEL maintainer="[email protected]"
LABEL version="0.2"
LABEL description="Base image, containing no language models."
# Install the required packages
RUN apt-get update && apt-get install -y \
build-essential \
libssl-dev \
supervisor \
curl \
nginx && \
apt-get -q clean -y && rm -rf /var/lib/apt/lists/* && rm -f /var/cache/apt/*.bin
# Install node for the frontend
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get install -y nodejs &&\
apt-get -q clean -y && rm -rf /var/lib/apt/lists/* && rm -f /var/cache/apt/*.bin
# Copy and set up the app
COPY . /app
# Build SASSC
RUN bash /app/build_sassc.sh
# Build app
RUN cd /app/frontend && make clean && make
RUN cd /app && make clean && make
# Configure nginx & supervisor
RUN mv /app/config/nginx.conf /etc/nginx/sites-available/default &&\
echo "daemon off;" >> /etc/nginx/nginx.conf && \
mv /app/config/supervisor.conf /etc/supervisor/conf.d/
ENV PORT 80
EXPOSE 80
CMD ["bash", "/app/start.sh"]