Skip to content

Commit e978c66

Browse files
authored
Merge pull request #173 from ComputerScienceHouse/develop
Schedulemaker v3.1
2 parents 6065979 + 5458c14 commit e978c66

File tree

14 files changed

+701
-482
lines changed

14 files changed

+701
-482
lines changed

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: php
2+
php:
3+
- 7.0
4+
- 7.1
5+
- 7.2
6+
- hhvm
7+
- nightly
8+
9+
matrix:
10+
allow_failures:
11+
- php: 7.0
12+
- php: hhvm
13+
- php: nightly
14+
15+
script:
16+
- if find . -name "*.php" ! -path "./vendor/*" -exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi

Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM php:7.1-apache
2+
MAINTAINER Devin Matte <[email protected]>
3+
4+
ADD apache-config.conf /etc/apache2/sites-enabled/000-default.conf
5+
6+
RUN a2enmod rewrite && a2enmod headers && a2enmod expires && \
7+
sed -i '/Listen/{s/\([0-9]\+\)/8080/; :a;n; ba}' /etc/apache2/ports.conf && \
8+
chmod og+rwx /var/lock/apache2 && chmod -R og+rwx /var/run/apache2
9+
10+
RUN apt-get -yq update && \
11+
apt-get -yq install gnupg libmagickwand-dev --no-install-recommends && \
12+
apt-get -yq clean all
13+
14+
RUN docker-php-ext-install mysqli && \
15+
pecl install imagick && docker-php-ext-enable imagick
16+
17+
COPY . /var/www/html
18+
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
27+
28+
EXPOSE 8080
29+
EXPOSE 8443

apache-config.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<VirtualHost *:8080>
2+
ServerAdmin [email protected]
3+
DocumentRoot /var/www/html
4+
5+
<Directory /var/www/html/>
6+
Options Indexes FollowSymLinks MultiViews
7+
AllowOverride All
8+
Order deny,allow
9+
Allow from all
10+
</Directory>
11+
12+
ErrorLog ${APACHE_LOG_DIR}/error.log
13+
CustomLog ${APACHE_LOG_DIR}/access.log combined
14+
15+
</VirtualHost>

api/entity.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
////////////////////////////////////////////////////////////////////////////
1111

1212
// REQUIRED FILES //////////////////////////////////////////////////////////
13-
require_once "../inc/config.php";
13+
if (file_exists('../inc/config.php')) {
14+
require_once "../inc/config.php";
15+
} else {
16+
require_once "../inc/config.env.php";
17+
}
1418
require_once "../inc/databaseConn.php";
1519
require_once "../inc/timeFunctions.php";
1620
require_once "../inc/ajaxError.php";

api/generate.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
////////////////////////////////////////////////////////////////////////////
1111

1212
// REQUIRED FILES
13-
require_once "../inc/config.php";
13+
if (file_exists('../inc/config.php')) {
14+
require_once "../inc/config.php";
15+
} else {
16+
require_once "../inc/config.env.php";
17+
}
1418
require_once "../inc/databaseConn.php";
1519
require_once "../inc/timeFunctions.php";
1620
require_once "../inc/ajaxError.php";

api/schedule.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
////////////////////////////////////////////////////////////////////////////
1010

1111
// REQUIRED FILES //////////////////////////////////////////////////////////
12-
require_once('../inc/config.php');
12+
if (file_exists('../inc/config.php')) {
13+
require_once "../inc/config.php";
14+
} else {
15+
require_once "../inc/config.env.php";
16+
}
1317
require_once('../inc/databaseConn.php');
1418
require_once('../inc/timeFunctions.php');
1519

api/search.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ function assertNumeric($var, $name) {
2525
}
2626

2727
// REQUIRED FILES //////////////////////////////////////////////////////////
28-
require_once "../inc/config.php";
28+
if (file_exists('../inc/config.php')) {
29+
require_once "../inc/config.php";
30+
} else {
31+
require_once "../inc/config.env.php";
32+
}
2933
require_once "../inc/databaseConn.php";
3034
require_once "../inc/timeFunctions.php";
3135
require_once "../inc/ajaxError.php";

0 commit comments

Comments
 (0)