Skip to content

Commit

Permalink
Merge pull request #220 from ComputerScienceHouse/develop
Browse files Browse the repository at this point in the history
3.1.3 Production Merge
  • Loading branch information
devinmatte authored Apr 30, 2020
2 parents 8561748 + 16322e7 commit fcd1a55
Show file tree
Hide file tree
Showing 73 changed files with 4,565 additions and 4,087 deletions.
25 changes: 25 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": [
"standard"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"no-undef": "off",
"no-unused-vars": "warn",
"no-prototype-builtins": "warn",
"no-redeclare": "warn",
"no-inner-declarations": "warn",
"no-throw-literal": "warn"
}
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ img/schedules/*.png

# Ignore node_modules dependencies
node_modules/*
package-lock.json

# Ignore built files
assets/prod/*
Expand All @@ -33,4 +34,6 @@ _Local Working Files/*
*.suo
web.config
vwd.webinfo
WebEssentials-Settings.json
WebEssentials-Settings.json
vendor
composer.lock
4 changes: 4 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ RewriteCond %{HTTP:Accept} application/json [NC]
RewriteRule ^(schedule|generate|entity|search|status|rmp)(?:/([^/]*))*$ api/$1.php [L]
RewriteRule ^schedule/[^/]*/ical$ api/schedule.php [L]

# Redirect all images to assets
# TODO Get it to redirect properly
# RewriteRule /([^.]+\.png)$ https://assets.csh.rit.edu/schedulemaker/$1 [R=301,L,NC]

# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@ php:
- 7.0
- 7.1
- 7.2
- hhvm
- 7.3
- nightly
node_js:
- 10

matrix:
allow_failures:
- php: 7.0
- php: hhvm
- php: 7.2
- php: 7.3
- php: nightly

install:
- npm install

script:
- if find . -name "*.php" ! -path "./vendor/*" -exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi
- npm run lint
- npm run build
37 changes: 20 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
FROM php:7.1-apache
MAINTAINER Devin Matte <[email protected]>
LABEL author="Devin Matte <[email protected]>"

ADD apache-config.conf /etc/apache2/sites-enabled/000-default.conf
RUN apt-get -yq update && \
apt-get -yq install gnupg libmagickwand-dev git gcc make autoconf libc-dev pkg-config --no-install-recommends

RUN docker-php-ext-install mysqli && \
yes '' | pecl install imagick && docker-php-ext-enable imagick

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY apache-config.conf /etc/apache2/sites-enabled/000-default.conf

RUN a2enmod rewrite && a2enmod headers && a2enmod expires && \
sed -i '/Listen/{s/\([0-9]\+\)/8080/; :a;n; ba}' /etc/apache2/ports.conf && \
chmod og+rwx /var/lock/apache2 && chmod -R og+rwx /var/run/apache2

RUN apt-get -yq update && \
apt-get -yq install gnupg libmagickwand-dev --no-install-recommends && \
apt-get -yq clean all

RUN docker-php-ext-install mysqli && \
pecl install imagick && docker-php-ext-enable imagick

COPY . /var/www/html

RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
apt-get -yq update && \
apt-get -yq install nodejs && \
npm install && \
npm run-script build && \
rm -rf node_modules && \
apt-get -yq remove nodejs && \
apt-get -yq clean all
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get -yq update \
&& apt-get -yq install nodejs --no-install-recommends \
&& npm install \
&& npm run-script build \
&& apt-get -yq remove nodejs \
&& apt-get -yq clean all \
&& rm -rf node_modules

RUN composer install

EXPOSE 8080
EXPOSE 8443
Loading

0 comments on commit fcd1a55

Please sign in to comment.