Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bookshare
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
30
Issues
30
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
SRCT
bookshare
Commits
613808ac
Commit
613808ac
authored
Feb 26, 2020
by
Daniel W Bond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copied over go Dockerfile... wow things have changed
parent
a11f5526
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
63 deletions
+10
-63
Dockerfile
Dockerfile
+10
-63
No files found.
Dockerfile
View file @
613808ac
############################################################
# Dockerfile to build What's Open Django App
############################################################
# Instructions:
#
# Note: You need to edit the empty string on the line that
# says "ENV SECRET_KEY" to be a secure random value.
#
# Any initialized data that needs to be imported should be
# placed in a directory called "fixtures" in the context
# of the build.
# (https://docs.djangoproject.com/en/dev/howto/initial-data/)
#
# Build Command: sudo docker build -t whats_open .
# Run Command: sudo docker run -p 8000:80 -i -t -d whats_open
#
# (You'll need to reverse proxy port 8000 via nginx)
# Set the base image to Ubuntu
FROM
ubuntu:14:04
# File Author / Maintainer
MAINTAINER
Student-Run Computing and Technology - GMU
# Update the sources list
FROM
python:3.6.9
ENV
PYTHONUNBUFFERED 1
RUN
apt-get update
RUN
apt-get
install
netcat python3-dev default-libmysqlclient-dev
-y
# Install basic applications
RUN
apt-get
install
-y
tar
git curl nano wget dialog net-tools build-essential
# Install Python and Basic Python Tools
RUN
apt-get
install
-y
python python-dev python-distribute python-pip
# Clone down SRCT-Web
RUN
git clone https://github.com/srct/whats-open.git whats-open
# Get pip to download and install requirements:
RUN
pip
install
-r
/whats-open/requirements.txt
# Set this to a unique, secure value before building
# (http://www.miniwebtool.com/django-secret-key-generator/)
ENV
SECRET_KEY ""
# Set the default directory where CMD will execute
WORKDIR
/whats-open/whats_open
# Setup database
RUN
python manage.py syncdb
--noinput
RUN
python manage.py migrate website
--noinput
# Generate static files in the STATIC_ROOT location
# (https://docs.djangoproject.com/en/dev/howto/static-files/deployment/)
RUN
python manage.py collectstatic
--noinput
# Add any inital data fixtures
# (https://docs.djangoproject.com/en/dev/howto/initial-data/)
ADD
fixtures /whats-open/whats_open/
# Import the loaded fixtures
RUN
python manage.py loaddata
users
schedules
# Expose ports
EXPOSE
80
# downgrade openssl security for login.gmu.edu compatibility
RUN
sed
-i
-e
's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g'
/etc/ssl/openssl.cnf
# Use Gunicorn to server the application
CMD
gunicorn whats_open.wsgi:application -b 0.0.0.0:80
RUN
mkdir
/go
WORKDIR
/go
ADD
/requirements/ /go/
RUN
pip
install
-r
base.txt
ADD
. /go/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment