Skip to content

Commit 3d09106

Browse files
committed
Major progress to images on s3
1 parent e41c4dc commit 3d09106

File tree

11 files changed

+423
-407
lines changed

11 files changed

+423
-407
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ _Local Working Files/*
3434
web.config
3535
vwd.webinfo
3636
WebEssentials-Settings.json
37-
/vendor/
37+
vendor
3838
composer.lock

.htaccess

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ RewriteCond %{HTTP:Accept} application/json [NC]
2020
RewriteRule ^(schedule|generate|entity|search|status|rmp)(?:/([^/]*))*$ api/$1.php [L]
2121
RewriteRule ^schedule/[^/]*/ical$ api/schedule.php [L]
2222

23+
# Redirect all images to assets
24+
# TODO Get it to redirect properly
25+
RewriteRule /([^.]+\.png)$ https://assets.csh.rit.edu/schedulemaker/$1 [R=301,L,NC]
26+
2327
# Don't rewrite files or directories
2428
RewriteCond %{REQUEST_FILENAME} -f [OR]
2529
RewriteCond %{REQUEST_FILENAME} -d

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

Dockerfile

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.1-apache
1+
FROM php:7.3-apache
22
MAINTAINER Devin Matte <[email protected]>
33

44
ADD apache-config.conf /etc/apache2/sites-enabled/000-default.conf
@@ -8,22 +8,26 @@ RUN a2enmod rewrite && a2enmod headers && a2enmod expires && \
88
chmod og+rwx /var/lock/apache2 && chmod -R og+rwx /var/run/apache2
99

1010
RUN apt-get -yq update && \
11-
apt-get -yq install gnupg libmagickwand-dev --no-install-recommends && \
11+
apt-get -yq install gnupg imagemagick libmagickwand-dev --no-install-recommends && \
1212
apt-get -yq clean all
1313

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

17+
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
18+
1719
COPY . /var/www/html
1820

19-
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
20-
apt-get -yq update && \
21-
apt-get -yq install nodejs && \
22-
npm install && \
23-
npm run-script build && \
24-
rm -rf node_modules && \
25-
apt-get -yq remove nodejs && \
26-
apt-get -yq clean all
21+
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
22+
&& apt-get -yq update \
23+
&& apt-get -yq install nodejs \
24+
&& npm install \
25+
&& npm run-script build \
26+
&& rm -rf node_modules \
27+
&& apt-get -yq remove nodejs \
28+
&& apt-get -yq clean all
29+
30+
RUN composer install
2731

2832
EXPOSE 8080
2933
EXPOSE 8443

api/generate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
require_once "../inc/databaseConn.php";
1717
require_once "../inc/timeFunctions.php";
1818
require_once "../inc/ajaxError.php";
19-
require_once "src/Generate.php";
19+
require_once "../api/src/Generate.php";
2020

2121
// IMPORTS
2222
use API\Generate;

0 commit comments

Comments
 (0)