-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/own-discoveries' into develop
- Loading branch information
Showing
96 changed files
with
3,061 additions
and
1,715 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,57 +10,61 @@ | |
# just default to using the nginx port only (recommended). There is no | ||
# requirement to map all exposed container ports onto host ports. | ||
# | ||
# To run with nginx only: | ||
# docker run -d -p 8200:8200 --name=neoexchange lcogtwebmaster/lcogt:neoexchange_$BRANCH | ||
# Build with | ||
# docker build -t docker.lcogt.net/neoexchange:latest . | ||
# | ||
# To run with nginx + uwsgi both exposed: | ||
# docker run -d -p 8200:8200 -p 8201:8201 --name=neox lcogtwebmaster/lcogt:neoexchange_$BRANCH | ||
# Push to docker registry with | ||
# docker push docker.lcogt.net/neoexchange:latest | ||
# | ||
# See the notes in the code below about NFS mounts. | ||
# To run with nginx + uwsgi both exposed: | ||
# docker run -d -p 8200:80 --name=neox docker.lcogt.net/neoexchange:latest | ||
# Or use the docker-compose.yml from github.com/LCOGT/docker/compose/neoexchange/ | ||
# | ||
################################################################################ | ||
FROM centos:centos7 | ||
MAINTAINER LCOGT <[email protected]> | ||
|
||
# Install package repositories | ||
RUN yum -y install epel-release | ||
|
||
# Install packages and update base system | ||
RUN yum -y install nginx python-pip mysql-devel python-devel supervisor | ||
RUN yum -y groupinstall "Development Tools" | ||
RUN yum -y update | ||
|
||
# Copy the LCOGT Mezzanine webapp files | ||
COPY neoexchange /var/www/apps/neoexchange | ||
RUN yum -y install epel-release \ | ||
&& yum -y install cronie libjpeg-devel nginx python-pip mysql-devel python-devel supervisor \ | ||
&& yum -y groupinstall "Development Tools" \ | ||
&& yum -y update | ||
|
||
# Setup our python env now so it can be cached | ||
COPY neoexchange/requirements.txt /var/www/apps/neoexchange/requirements.txt | ||
# Install the LCOGT NEO exchange Python required packages | ||
RUN pip install pip==1.3 && pip install uwsgi==2.0.8 | ||
RUN pip install -r /var/www/apps/neoexchange/pip_requirements.txt | ||
RUN pip install pip==1.3 && pip install uwsgi==2.0.8 \ | ||
&& pip install -r /var/www/apps/neoexchange/requirements.txt | ||
|
||
# LCOGT packages which have to be installed after the normal pip install | ||
RUN pip install pyslalib --extra-index-url=http://buildsba.lco.gtn/python/ | ||
RUN pip install rise_set --extra-index-url=http://buildsba.lco.gtn/python/ | ||
RUN pip install pyslalib --extra-index-url=http://buildsba.lco.gtn/python/ \ | ||
&& pip install rise_set --extra-index-url=http://buildsba.lco.gtn/python/ | ||
|
||
# Ensure crond will run on all host operating systems | ||
RUN sed -i -e 's/\(session\s*required\s*pam_loginuid.so\)/#\1/' /etc/pam.d/crond | ||
|
||
# Setup the Python Django environment | ||
ENV PYTHONPATH /var/www/apps | ||
ENV DJANGO_SETTINGS_MODULE neox.settings | ||
ENV BRANCH ${BRANCH} | ||
#ENV BUILDDATE ${BUILDDATE} | ||
|
||
# Setup the LCOGT Mezzanine webapp | ||
RUN python /var/www/apps/neoexchange/manage.py validate | ||
RUN python /var/www/apps/neoexchange/manage.py collectstatic --noinput | ||
RUN python /var/www/apps/neoexchange/manage.py syncdb --noinput | ||
RUN python /var/www/apps/neoexchange/manage.py migrate --noinput | ||
|
||
# Copy configuration files | ||
COPY config/uwsgi.ini /etc/uwsgi.ini | ||
COPY config/nginx/* /etc/nginx/ | ||
COPY config/neoexchange.ini /etc/supervisord.d/neoexchange.ini | ||
COPY config/processes.ini /etc/supervisord.d/processes.ini | ||
COPY config/crontab.root /var/spool/cron/root | ||
|
||
# nginx runs on port 8200, uwsgi runs on port 8201 | ||
EXPOSE 8200 8201 | ||
# nginx runs on port 80, uwsgi is linked in the nginx conf | ||
EXPOSE 80 | ||
|
||
# The entry point is our init script, which runs startup tasks, then | ||
# execs the supervisord daemon | ||
ENTRYPOINT [ "/init" ] | ||
|
||
# Copy configuration files | ||
COPY config/init /init | ||
|
||
# Copy the LCOGT Mezzanine webapp files | ||
COPY neoexchange /var/www/apps/neoexchange | ||
|
||
# Entry point is the supervisord daemon | ||
ENTRYPOINT [ "/usr/bin/supervisord", "-n" ] | ||
# Setup the LCOGT NEOx webapp | ||
RUN python /var/www/apps/neoexchange/manage.py collectstatic --noinput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Put your cron jobs here | ||
10 5 * * * python /var/www/apps/neoexchange/manage.py fetch_goldstone_targets | ||
10 5 * * * python /var/www/apps/neoexchange/manage.py update_neocp_data | ||
10 5 * * * python /var/www/apps/neoexchange/manage.py update_crossids | ||
20 5 * * * python /var/www/apps/neoexchange/manage.py update_neocp_data | ||
30 5 * * * python /var/www/apps/neoexchange/manage.py update_crossids |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
# Substitute the prefix into the nginx configuration | ||
# If any schema changed have happened but not been applied | ||
python /var/www/apps/neoexchange/manage.py migrate --noinput | ||
|
||
# Run under supervisord | ||
exec /usr/bin/supervisord -n -c /etc/supervisord.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ http { | |
} | ||
|
||
server { | ||
listen 8200; | ||
listen 80; | ||
server_name dockerhost; | ||
charset utf-8; | ||
|
||
|
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.