-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (28 loc) · 995 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
33
34
35
36
37
38
FROM tiangolo/uwsgi-nginx-flask:flask-python3.5
MAINTAINER Javier Martinez "[email protected]"
# Set where are we working from, note that from this point onward most '.' will be replaceable with /app
WORKDIR /app
# Dependencies
COPY requirements.txt .
RUN pip3 install -r requirements.txt
# ssh config
RUN mkdir -p ~/.ssh
COPY resources/id_rsa .
RUN cp id_rsa ~/.ssh/id_rsa && cp id_rsa ~/.ssh/known_hosts && rm id_rsa
# Web Server Gateway Interface with uWSGI
COPY wsgi.py .
COPY uwsgi.ini .
# Directory for file uploads
RUN mkdir -p /images
# nginx configuration for larger file sizes
COPY nginx-conf/nginx.conf /etc/nginx/
COPY nginx-conf/upload.conf /etc/nginx/conf.d/
# Database initialization script
COPY create_db.py .
# Make sure everything is accesible
ENV PYTHONPATH "$PYTHONPATH:/WhatAClass:/WhatAClass/WhatAClass"
# Copy app and apps config files
RUN mkdir -p ./static/images
COPY ./WhatAClass/static ./static
COPY ./config ./config
COPY ./WhatAClass ./WhatAClass