-
Notifications
You must be signed in to change notification settings - Fork 39
Moving Schedulemaker to Openshift #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moving Schedulemaker to Openshift #172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of Dockerfile refactoring but otherwise looks good. In general, try to minimize the number of statements in your Dockerfile to minimize the number of layers, which helps with image caching.
inc/config.env.php
Outdated
| $DATABASE_USER = $get_env(getenv("DATABASE_USER"), ''); | ||
| $DATABASE_PASS = $get_env(getenv("DATABASE_PASS"), ''); | ||
| $DATABASE_DB = $get_env(getenv("DATABASE_DB"), ''); | ||
| $DUMPCLASSES = '/mnt/share/cshclass.dat'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These will also likely need to be configurable, with a default such as /data
Dockerfile
Outdated
| FROM php:7.1-apache | ||
| MAINTAINER Devin Matte <matted@csh.rit.edu> | ||
|
|
||
| EXPOSE 8080 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EXPOSE statements are typically at the end of the file
Dockerfile
Outdated
| ADD apache-config.conf /etc/apache2/sites-enabled/000-default.conf | ||
|
|
||
| RUN apt-get -yq update && \ | ||
| apt-get -yq install gnupg libmagickwand-dev --no-install-recommends |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to run apt-get -yq clean all here
Dockerfile
Outdated
|
|
||
| RUN a2enmod rewrite && a2enmod headers && a2enmod expires | ||
|
|
||
| RUN sed -i '/Listen/{s/\([0-9]\+\)/8080/; :a;n; ba}' /etc/apache2/ports.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine both of these RUN statements, along with the RUN statement at the end of the file (do all Apache config in a single RUN statement)
Dockerfile
Outdated
| apt-get -yq install gnupg libmagickwand-dev --no-install-recommends | ||
|
|
||
| RUN docker-php-ext-install mysqli | ||
| RUN pecl install imagick && docker-php-ext-enable imagick |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine these RUN statements
Dockerfile
Outdated
| npm install && \ | ||
| npm run-script build && \ | ||
| rm -rf node_modules && \ | ||
| apt-get -yq remove nodejs npm && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not installing npm, does the package stay behind when nodejs is removed? Otherwise, remove it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 🎉
We're getting ready to move far away from Yasuko for almost all web projects. This is the first stage in getting schedulemaker off of Yasuko, and onto openshift.
We're first starting by moving schedulemaker-dev. Currently everything except for running the cron for parsing. That's in the works and should be done soon.