Skip to content

Commit

Permalink
convert docker to use python3
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavidwhiteside committed Feb 6, 2021
1 parent 779bf30 commit 15a81c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
15 changes: 7 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@ FROM debian:stable
MAINTAINER David Whiteside <david@davidwhiteside.com>

# pivportal-api dependencies
RUN apt-get update && apt-get install -y python \
python-setuptools \
python-dev \
RUN apt-get update && apt-get install -y python3.7 \
python3-pip \
python3.7-dev \
build-essential \
libffi-dev \
openssl \
libssl-dev \
apache2 \
redis-server \
python-pip
RUN pip install -U pip
RUN pip install -U setuptools
redis-server
RUN python3.7 -m pip install -U pip
RUN python3.7 -m pip install -U setuptools

# pivportal application user and group
RUN groupadd -r pivportal && useradd -r -g pivportal pivportal

# pivportal-api install latest stable
RUN pip install -U pivportal
RUN python3.7 -m pip install -U pivportal

# Apache
RUN a2enmod ssl
Expand Down
10 changes: 5 additions & 5 deletions docker/httpd-pivportal.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NameVirtualHost *:80

<VirtualHost *:80>
ServerName pivportal
DocumentRoot /usr/local/lib/python2.7/dist-packages/pivportal/data_files/
DocumentRoot /usr/local/lib/python3.7/dist-packages/pivportal/data_files/
Redirect permanent / https://pivportal/
</VirtualHost>

Expand All @@ -23,10 +23,10 @@ NameVirtualHost *:80
SSLVerifyDepth 5

ServerName pivportal
DocumentRoot /usr/local/lib/python2.7/dist-packages/pivportal/data_files/
DocumentRoot /usr/local/lib/python3.7/dist-packages/pivportal/data_files/
DirectoryIndex index.html

<Directory /usr/local/lib/python2.7/dist-packages/pivportal/data_files/>
<Directory /usr/local/lib/python3.7/dist-packages/pivportal/data_files/>
Allow from all
Order allow,deny
AllowOverride All
Expand Down Expand Up @@ -80,10 +80,10 @@ NameVirtualHost *:80
SSLVerifyDepth 5

ServerName pivportal_client
DocumentRoot /usr/local/lib/python2.7/dist-packages/pivportal/data_files/
DocumentRoot /usr/local/lib/python3.7/dist-packages/pivportal/data_files/
DirectoryIndex index.html

<Directory /usr/local/lib/python2.7/dist-packages/pivportal/data_files/>
<Directory /usr/local/lib/python3.7/dist-packages/pivportal/data_files/>
Allow from all
Order allow,deny
AllowOverride All
Expand Down

0 comments on commit 15a81c0

Please sign in to comment.