-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
46 lines (36 loc) · 1.26 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
38
39
40
41
42
43
44
45
46
FROM centos
MAINTAINER Cody De Arkland <[email protected]>
EXPOSE 443
WORKDIR /srv/avss/appdata
RUN yum install -y epel-release && \
yum install -y python34 \
python34-pip \
uwsgi \
uwsgi-plugin-python3 \
uwsgi-logger-file \
nginx \
git \
wget \
gcc \
python34-devel.x86_64 \
openssl-devel.x86_64 && \
yum clean all
RUN python3 -m pip install --user virtualenv
RUN mkdir -p /etc/uwsgi.d && \
mkdir -p /srv && \
python3 -m virtualenv /srv/avss
RUN . /srv/avss/bin/activate; pip3 install flask flask-ask requests configparser flask_sqlalchemy flask_assets pyvmomi
COPY . /srv/avss/appdata
RUN mv configs/nginx.conf /etc/nginx/nginx.conf
RUN mv configs/avss.ini /etc/uwsgi.d/avss.ini
RUN mv configs/alexavsphereskill.conf /etc/nginx/conf.d/alexavsphereskill.conf
RUN mkdir -p /etc/letsencrypt/live/pyva.humblelab.com/
RUN mv configs/*.pem /etc/letsencrypt/live/pyva.humblelab.com/
RUN mv configs/startup.sh /srv/avss/startup.sh
RUN rmdir /srv/avss/appdata/configs
RUN chown uwsgi:nginx /srv/avss && \
chown uwsgi:nginx /etc/uwsgi.d/avss.ini && \
chmod 755 /srv/avss/startup.sh && chmod 777 /srv/avss/appdata/etc/config.ini && \
chmod 777 /srv/avss/appdata/etc/auth.ini
CMD /srv/avss/startup.sh
CMD ["/bin/bash"]