Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisGalliano committed May 1, 2019
0 parents commit 91eb3ce
Show file tree
Hide file tree
Showing 57 changed files with 12,738 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Default ignored files
/.idea/shelf/
/.idea/workspace.xml

# Datasource local storage ignored files
/.idea/dataSources/
dataSources.local.xml

# Editor-based HTTP Client requests
/.idea/httpRequests/
rest-client.private.env.json
http-client.private.env.json


web-app/vendor/
web-app/node_modules/
web-app/web/assets/compiled/
10 changes: 10 additions & 0 deletions .idea/PionExample.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

462 changes: 462 additions & 0 deletions .idea/codeStyles/Project.xml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/composerJson.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/dictionaries/chris.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/file.template.settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/fileTemplates/internal/PHP Class.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

128 changes: 128 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/scopes/Views.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/watcherTasks.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 ChrisGalliano

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# How to
1. Install [docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04) & [docker-compose](https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-16-04#);
2. Clone or download Pion-example project;
3. Run `docker-compose up --build` in project directory (this may take some time);
4. Add `127.0.1.1 pion-example.loc` to your hosts file;
5. Go to http://pion-example.loc:8020/
6. Explore :)


# Gulp
## Watching changes
By default, gulp is running in production mode. The "watching changes" feature is available in developer mode.
If you want to run gulp in developer mode please add the following environment variable: `PION_EXMPL_DEBUG=1`.
41 changes: 41 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: '3'

services:
php:
build:
context: ./
dockerfile: php/Dockerfile
volumes:
- ./web-app:/usr/share/nginx/html

composer:
image: composer/composer:php7
working_dir: /web-app
command: install --ignore-platform-reqs
volumes:
- ./web-app:/web-app
depends_on:
- php

gulp:
build:
context: ./
dockerfile: gulp/Dockerfile
volumes:
- ./web-app:/web-app
- ./gulp:/gulp
depends_on:
- php
environment:
- PION_EXMPL_DEBUG

nginx:
image: nginx:1.13
ports:
- 8020:80
volumes:
- ./web-app:/usr/share/nginx/html
- ./nginx/site.conf:/etc/nginx/conf.d/site.conf
depends_on:
- php
- composer
5 changes: 5 additions & 0 deletions gulp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM node:7.8
RUN npm install -g gulp node-sass

WORKDIR /web-app
CMD ["/gulp/build.sh"]
10 changes: 10 additions & 0 deletions gulp/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

npm install
if [ $PION_EXMPL_DEBUG ] ; then
echo "========== ========== ========== gulp watch"
gulp watch
else
echo "========== ========== ========== gulp build"
gulp build
fi;
29 changes: 29 additions & 0 deletions nginx/site.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
server {
root /usr/share/nginx/html/web;
listen 80;
server_name pion-example.loc;

location / {
try_files $uri /index.php$is_args$args;
}

location ~ \.php$ {
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}

location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}

location ~* \.(?:css|js)$ {
expires 1w;
access_log off;
add_header Cache-Control "public";
}
}
Loading

0 comments on commit 91eb3ce

Please sign in to comment.