Skip to content

Commit 84f39ee

Browse files
authored
Merge pull request #237 from ComputerScienceHouse/develop
Version 3.2.0
2 parents fcd1a55 + 755940e commit 84f39ee

File tree

63 files changed

+604
-333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+604
-333
lines changed

.dockerignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Dockerfile
2+
.dockerignore
3+
.gitignore
4+
.nvmrc
5+
node_modules
6+
assets/dist
7+
assets/prod
8+
LICENSE
9+
README.md
10+

.eslintrc.json

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
"commonjs": true,
55
"es6": true
66
},
7+
"parser": "@typescript-eslint/parser",
8+
"plugins": [
9+
"@typescript-eslint"
10+
],
711
"extends": [
812
"standard"
913
],
@@ -16,6 +20,7 @@
1620
},
1721
"rules": {
1822
"no-undef": "off",
23+
"no-var": "warn",
1924
"no-unused-vars": "warn",
2025
"no-prototype-builtins": "warn",
2126
"no-redeclare": "warn",

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @ComputerScienceHouse/schedulemaker-maintainers

.github/workflows/npm.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Node.js Checks
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
pull_request:
7+
branches: [ master, develop ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [10.x]
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
- run: npm install
25+
- run: npm run lint
26+
- run: npm run typecheck
27+
- run: npm run build

.github/workflows/php.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: PHP Checks
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
pull_request:
7+
branches: [ master, develop ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Validate composer.json and composer.lock
18+
run: composer validate
19+
20+
- name: Install dependencies
21+
run: composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs
22+
23+
- name: Check PHP Syntax
24+
run: if find . -name "*.php" ! -path "./vendor/*" -exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ package-lock.json
1212

1313
# Ignore built files
1414
assets/prod/*
15+
assets/dist/*
1516
!assets/prod/.gitkeep
1617

1718
# Other files

.travis.yml

-24
This file was deleted.

Dockerfile

+52-11
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,71 @@
1-
FROM php:7.1-apache
1+
FROM node:10-buster-slim as builder
22
LABEL author="Devin Matte <[email protected]>"
33

4+
WORKDIR /usr/src/schedule
5+
COPY package.json ./
6+
7+
RUN npm install
8+
9+
COPY package.json tsconfig.json gulpfile.js ./
10+
COPY assets ./assets
11+
RUN npm run-script build
12+
13+
14+
FROM php:7.3-apache as php-setup
15+
LABEL author="Devin Matte <[email protected]>"
16+
17+
RUN echo "deb-src http://deb.debian.org/debian buster main" >> /etc/apt/sources.list
18+
419
RUN apt-get -yq update && \
5-
apt-get -yq install gnupg libmagickwand-dev git gcc make autoconf libc-dev pkg-config --no-install-recommends
20+
apt-get -yq install \
21+
gnupg \
22+
libmagickwand-dev \
23+
git \
24+
gcc \
25+
make \
26+
autoconf \
27+
libc-dev \
28+
pkg-config \
29+
build-essential \
30+
libx11-dev \
31+
libxext-dev \
32+
zlib1g-dev \
33+
libpng-dev \
34+
libjpeg-dev \
35+
libfreetype6-dev \
36+
libxml2-dev \
37+
unzip \
38+
wget \
39+
--no-install-recommends
40+
41+
RUN apt-get -yq build-dep imagemagick
42+
43+
RUN wget https://github.com/ImageMagick/ImageMagick6/archive/6.9.11-22.tar.gz && \
44+
tar -xzvf 6.9.11-22.tar.gz && \
45+
cd ImageMagick6-6.9.11-22 && \
46+
./configure && \
47+
make && \
48+
make install && \
49+
ldconfig /usr/local/lib && \
50+
make check
651

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

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

57+
58+
FROM php-setup
59+
LABEL author="Devin Matte <[email protected]>"
60+
1261
COPY apache-config.conf /etc/apache2/sites-enabled/000-default.conf
1362

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

1867
COPY . /var/www/html
19-
20-
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
21-
&& apt-get -yq update \
22-
&& apt-get -yq install nodejs --no-install-recommends \
23-
&& npm install \
24-
&& npm run-script build \
25-
&& apt-get -yq remove nodejs \
26-
&& apt-get -yq clean all \
27-
&& rm -rf node_modules
68+
COPY --from=builder /usr/src/schedule/assets/prod /var/www/html/assets/prod
2869

2970
RUN composer install
3071

README.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,26 @@ Available at [schedule.csh.rit.edu](https://schedule.csh.rit.edu)
1717
## Dev Environment
1818

1919
### Setup
20-
- Fork and clone the repository
21-
- Copy the `config.example.php` file to `config.php` in `/inc/` or set environment variables as defined in `config.env.php`
22-
- Contact a current maintainer for server/database configs
23-
- If you wish to see images locally, you will also need S3 credentials, either supply your own or reach out
20+
- Fork and clone the repository.
21+
- Copy the `config.example.php` file to `config.php` in `/inc/` or set environment variables as defined in `config.env.php`.
22+
- Contact a current maintainer for server/database configs.
23+
- If you wish to see images locally, you will also need S3 credentials, either supply your own or reach out.
2424

2525
### Run Locally
26-
In order to run locally youre going to need [docker](https://www.docker.com/)
26+
In order to run locally youre going to need [docker](https://www.docker.com/).
2727

2828
```
2929
docker build -t schedulemaker .
3030
docker run --rm -i -t -p 5000:8080 --name=schedulemaker schedulemaker
3131
```
3232

33-
You can replace `5000` with whatever port you wish to connect locally to. Then visit `http://localhost:5000` in a browser
33+
You can replace `5000` with whatever port you wish to connect locally to. Then visit `http://localhost:5000` in a browser.
3434

3535
### Development
36-
- To build js files run `npm run-script build`
37-
- Increment the version number in `package.json` after updating js/css files or ensure all cache cleared
38-
- Make sure you increment at least the patch number in any PRs that touch Javascript/CSS
36+
- To build js files run `npm run-script build`.
37+
- Increment the version number in `package.json` after updating js/css files or ensure all cache cleared.
38+
- Make sure you increment at least the patch number in any PRs that touch Javascript/CSS.
39+
- If you get an error with JS/CSS not loading, check your config file.
3940

4041
## Maintainers
4142

@@ -44,4 +45,4 @@ You can replace `5000` with whatever port you wish to connect locally to. Then v
4445

4546
#### Past Maintainers
4647
- Ben Grawi ([@bgrawi](https://github.com/bgrawi))
47-
- Benjamin Russell ([@benrr101](https://github.com/benrr101))
48+
- Benjamin Russell ([@benrr101](https://github.com/benrr101))

0 commit comments

Comments
 (0)