Skip to content

Commit

Permalink
push files
Browse files Browse the repository at this point in the history
  • Loading branch information
coachmaxz committed Nov 15, 2018
1 parent 8e734db commit 1ff7bf7
Show file tree
Hide file tree
Showing 19 changed files with 226 additions and 117 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
www/composer.lock
!.gitignore
17 changes: 0 additions & 17 deletions Dockerfile

This file was deleted.

21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
# docker-php7phalcon
Getting started for Docker Engine CE (Free Version)
---------------------------------------------------

```
sudo mkdir -p build && cd build
sudo apt-get install git -y
sudo git clone https://github.com/drivesoft-technology/docker-awesome.git
cd docker-awesome
```


Install Docker Engine CE v18.06.1 (Free Version)
---------------------------------------------------

```
bash docker-install/install-docker-engine-on-ubuntu18.sh
```


Install Docker Compose v1.22.0
---------------------------------------------------

```
bash docker-install/install-docker-compose-on-ubuntu18.sh
```


Start Service | Phalcon Application Template
---------------------------------------------------

```
sudo git clone https://github.com/codestepz/docker-php7phalcon.git
sudo docker-compose -f docker-php7phalcon/docker-compose.yml up -d
```

```
http://[IP ADDRESS] << Nginx v1.15.4-alpine
http://[IP ADDRESS]/info.php << PHP v7.2.10 (FPM)
```
15 changes: 0 additions & 15 deletions build/mongodb/Dockerfile

This file was deleted.

18 changes: 0 additions & 18 deletions build/mongodb/README.md

This file was deleted.

18 changes: 0 additions & 18 deletions build/phalcon3/Dockerfile

This file was deleted.

18 changes: 0 additions & 18 deletions build/phalcon3/README.md

This file was deleted.

52 changes: 52 additions & 0 deletions conf.d/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
server {

listen 80;
server_name localhost;

root /usr/share/nginx/html;
index index.php index.html index.htm;

charset utf-8;
client_max_body_size 25m;

add_header 'Access-Control-Allow-Origin' '*';

location / {
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {
proxy_cache off;
root /usr/share/nginx/html;
expires max;
try_files $uri @fallback;
}
}

location = /favicon.ico {
access_log off;
log_not_found off;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass phpfpm:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_hide_header X-Powered-By;
proxy_hide_header X-Powered-By;
proxy_pass_header Server;
}

location ~ /\.ht {
deny all;
return 404;
}

error_page 401 403 404 /404.html;
error_log /var/log/nginx/localhost.error.log;

}
28 changes: 28 additions & 0 deletions conf.d/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {

include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
keepalive_timeout 65;

include /etc/nginx/conf.d/*.conf;

}
10 changes: 10 additions & 0 deletions conf.d/php7.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
file_uploads = On

post_max_size = 30M
upload_max_filesize = 30M

memory_limit = 30M
max_execution_time = 600

# session.save_handler = redis
# session.save_path = "tcp://0.0.0.0:6379?auth=ee14586a07100033ec4a29abb4876735ccab39bf"
58 changes: 58 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
version: '3'

services:

# ======================================================================
# Language
# ======================================================================

php7fpm1:
image: codestep/php7phalcon:7.2.10
container_name: docker-php7fpm1
working_dir: /usr/share/nginx/html
restart: always
environment:
- VIRTUAL_PORT=9000
- TERM=xterm
volumes:
- ./www:/usr/share/nginx/html
- ./conf.d/php7.ini:/usr/local/etc/php/php.ini
ports:
- "9000:9000"
networks:
- frontend_network

# ======================================================================
# Web Server
# ======================================================================

main:
image: nginx:1.15.6-alpine
container_name: docker-main
working_dir: /usr/share/nginx/html
restart: always
environment:
- VIRTUAL_HOST=localhost
- VIRTUAL_PORT=80
- NGINX_HOST=location
- NGINX_PORT=80
- TERM=xterm
volumes:
- ./www:/usr/share/nginx/html
- ./conf.d/nginx.conf:/etc/nginx/nginx.conf
- ./conf.d/default.conf:/etc/nginx/conf.d/default.conf
links:
- "php7fpm1:phpfpm"
ports:
- "80:80"
networks:
- frontend_network

networks:
frontend_network:
# name: frontend_network
# driver: bridge
ipam:
driver: default
config:
- subnet: 172.28.0.0/24
Binary file removed php7-ext/mongodb-v1.3.4.so
Binary file not shown.
Binary file removed php7-ext/phalcon-v3.3.0.so
Binary file not shown.
1 change: 0 additions & 1 deletion php7-ini/20-mongodb.ini

This file was deleted.

1 change: 0 additions & 1 deletion php7-ini/20-phalcon.ini

This file was deleted.

7 changes: 0 additions & 7 deletions php7-ini/php7.ini

This file was deleted.

32 changes: 32 additions & 0 deletions www/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title> Phalcon Framework 3.4.1 </title>
<link rel="shortcut icon" href="http://localhost/images/favicon/favicon.ico" type="image/x-icon">
<link rel="icon" href="http://localhost/images/favicon/favicon.ico" type="image/x-icon">
<base href="http://localhost" />
<script>var baseUrl = "http://localhost";</script>
<link rel="stylesheet" type="text/css" href="http://localhost/themes/main/assets/style/theme-build.css?v=1.0.0" />
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="container">
<div class="row">
<div class="row">
<div class="col-12">
<div class="text-welcome" style="padding-top: 230px;">
<h1 style="margin:0;padding:0;font-size:4.0em;"> Phalcon Framework </h1>
<h2 style="margin:0;padding: 15px 0 0;font-size:1.6em;"> CodeStep โค้ดสเต็ป - เรียนรู้ออนไลน์ สะดวก ง่าย เข้าถึงได้ทุกที่ </h2>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions www/info.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php phpinfo(); ?>

0 comments on commit 1ff7bf7

Please sign in to comment.