├── README.md ├── docker-build ├── .DS_Store ├── laravel11-with-php83 │ ├── Dockerfile │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php ├── mongodb-with-php74 │ ├── Dockerfile │ ├── README.md │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php ├── mongodb-with-php83 │ ├── Dockerfile │ ├── README.md │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php ├── node-with-restapi │ ├── .DS_Store │ ├── README.md │ ├── app │ │ ├── .DS_Store │ │ ├── .gitignore │ │ ├── app.js │ │ ├── package-lock.json │ │ └── package.json │ ├── build │ │ └── Dockerfile │ └── docker-compose.yml ├── phalcon5-with-php74 │ ├── Dockerfile │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php ├── phalcon5-with-php80 │ ├── Dockerfile │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php ├── phalcon5-with-php81 │ ├── Dockerfile │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php ├── phalcon5-with-php82 │ ├── Dockerfile │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php ├── phalcon5-with-php83 │ ├── Dockerfile │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php ├── php74fpm-with-nginx │ ├── Dockerfile │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php ├── php80fpm-with-nginx │ ├── Dockerfile │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php ├── php81fpm-with-nginx │ ├── Dockerfile │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php ├── php82fpm-with-nginx │ ├── Dockerfile │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php ├── php82fpm-with-wordpress │ ├── build │ │ └── Dockerfile │ ├── conf.d │ │ ├── default.conf │ │ ├── nginx.conf │ │ └── php82.ini │ ├── db │ │ └── .gitignore │ ├── docker-compose.yml │ └── www │ │ └── index.php ├── php83fpm-with-nginx │ ├── Dockerfile │ ├── docker-compose.yml │ └── nginx │ │ ├── localhost.conf │ │ └── www │ │ └── index.php └── php83fpm-with-wordpres │ ├── build │ └── Dockerfile │ ├── conf.d │ ├── default.conf │ ├── nginx.conf │ └── php83.ini │ ├── db │ └── .gitignore │ ├── docker-compose.yml │ └── www │ └── index.php ├── docker-compose ├── mariadb-example │ ├── README.md │ ├── data │ │ └── .gitignore │ └── docker-compose.yml ├── mongo-example │ ├── README.md │ ├── data │ │ └── .gitignore │ └── docker-compose.yml ├── mysql-example │ ├── README.md │ ├── data │ │ └── .gitignore │ └── docker-compose.yml ├── nginx-example │ ├── README.md │ ├── conf.d │ │ ├── default.conf │ │ └── nginx.conf │ ├── docker-compose.yml │ └── www │ │ └── index.html ├── nginx-php7-fpm │ ├── README.md │ ├── conf.d │ │ ├── default.conf │ │ └── nginx.conf │ ├── docker-compose.yml │ ├── php7-ini │ │ └── php7.ini │ └── www │ │ ├── index.html │ │ ├── index.php │ │ └── info.php ├── node-example │ ├── Dockerfile │ ├── README.md │ ├── app │ │ ├── package.json │ │ └── server.js │ └── docker-compose.yml ├── phalcon-php7-fpm │ ├── README.md │ ├── conf.d │ │ └── default.conf │ ├── docker-compose.yml │ ├── php7-ini │ │ └── php7.ini │ └── www │ │ ├── index.html │ │ ├── index.php │ │ └── info.php ├── php7-example │ ├── README.md │ ├── docker-compose.yml │ └── php7-ini │ │ └── php7.ini └── redis-example │ ├── README.md │ ├── conf.d │ └── redis.conf │ ├── data │ └── .gitignore │ └── docker-compose.yml ├── docker-files ├── php74-ext │ ├── mongodb-1.17.0.so │ ├── phalcon-5.3.1.so │ └── psr-1.2.0.so ├── php74-ini │ ├── mongodb-1.17.0.ini │ ├── phalcon-5.3.1.ini │ └── psr-1.2.0.ini ├── php80-ext │ ├── mongodb-1.17.0.so │ ├── phalcon-5.3.1.so │ └── psr-1.2.0.so ├── php80-ini │ ├── mongodb-1.17.0.ini │ ├── phalcon-5.3.1.ini │ └── psr-1.2.0.ini ├── php81-ext │ ├── mongodb-1.17.0.so │ ├── phalcon-5.3.1.so │ └── psr-1.2.0.so ├── php81-ini │ ├── mongodb-1.17.0.ini │ ├── phalcon-5.3.1.ini │ └── psr-1.2.0.ini ├── php82-ext │ ├── php82-mongodb-1.17.0.so │ ├── php82-phalcon-5.3.1.so │ └── psr-1.2.0.so └── php82-ini │ ├── php82-mongodb-1.17.0.ini │ ├── php82-phalcon-5.3.1.ini │ └── psr-1.2.0.ini ├── docker-install ├── README.md ├── install-ctop-monitor.sh ├── install-docker-compose-on-gce.sh ├── install-docker-compose-on-ubuntu18.sh ├── install-docker-compose-on-ubuntu20.sh ├── install-docker-compose-on-ubuntu22.sh ├── install-docker-engine-on-gcp-with-debian9.sh ├── install-docker-engine-on-ubuntu18.sh ├── install-docker-engine-on-ubuntu20.sh ├── install-docker-engine-on-ubuntu22.sh ├── install-docker-engine-on-ubuntu24.sh ├── install-nginx-on-ubuntu22.sh ├── install-nginx-on-ubuntu24.sh ├── install-nodejs-16-on-ubuntu20.sh ├── install-nodejs-16-on-ubuntu22.sh ├── install-nodejs-18-on-ubuntu22.sh ├── install-nodejs-18-on-ubuntu24.sh ├── install-nodejs-20-on-ubuntu22.sh ├── install-nodejs-20-on-ubuntu24.sh ├── install-nodejs-22-on-ubuntu24.sh ├── install-php74-fpm-and-composer-on-ubuntu22.sh ├── install-php74-fpm-and-composer-on-ubuntu24.sh ├── install-php80-fpm-and-composer-on-ubuntu20.sh ├── install-php81-fpm-and-composer-on-ubuntu20.sh ├── install-php81-fpm-and-composer-on-ubuntu22.sh ├── install-php81-fpm-and-composer-on-ubuntu24.sh ├── install-php82-fpm-and-composer-on-ubuntu22.sh ├── install-php83-fpm-and-composer-on-ubuntu22.sh ├── install-php83-fpm-and-composer-on-ubuntu24.sh └── install-php84-fpm-and-composer-on-ubuntu24.sh ├── docker-php ├── php7-laravel5 │ ├── README.md │ ├── conf.d │ │ └── default.conf │ ├── data │ │ └── .gitignore │ ├── docker-compose.yml │ ├── php7-ini │ │ └── php7.ini │ └── www │ │ ├── index.php │ │ ├── info.php │ │ └── laravelapp │ │ ├── .editorconfig │ │ ├── .env │ │ ├── .env.example │ │ ├── .gitattributes │ │ ├── app │ │ ├── Console │ │ │ └── Kernel.php │ │ ├── Exceptions │ │ │ └── Handler.php │ │ ├── Http │ │ │ ├── Controllers │ │ │ │ ├── Auth │ │ │ │ │ ├── ForgotPasswordController.php │ │ │ │ │ ├── LoginController.php │ │ │ │ │ ├── RegisterController.php │ │ │ │ │ ├── ResetPasswordController.php │ │ │ │ │ └── VerificationController.php │ │ │ │ └── Controller.php │ │ │ ├── Kernel.php │ │ │ └── Middleware │ │ │ │ ├── Authenticate.php │ │ │ │ ├── CheckForMaintenanceMode.php │ │ │ │ ├── EncryptCookies.php │ │ │ │ ├── RedirectIfAuthenticated.php │ │ │ │ ├── TrimStrings.php │ │ │ │ ├── TrustProxies.php │ │ │ │ └── VerifyCsrfToken.php │ │ ├── Providers │ │ │ ├── AppServiceProvider.php │ │ │ ├── AuthServiceProvider.php │ │ │ ├── BroadcastServiceProvider.php │ │ │ ├── EventServiceProvider.php │ │ │ └── RouteServiceProvider.php │ │ └── User.php │ │ ├── artisan │ │ ├── bootstrap │ │ ├── app.php │ │ └── cache │ │ │ └── .gitignore │ │ ├── config │ │ ├── app.php │ │ ├── auth.php │ │ ├── broadcasting.php │ │ ├── cache.php │ │ ├── database.php │ │ ├── filesystems.php │ │ ├── hashing.php │ │ ├── logging.php │ │ ├── mail.php │ │ ├── queue.php │ │ ├── services.php │ │ ├── session.php │ │ └── view.php │ │ ├── database │ │ ├── .gitignore │ │ ├── factories │ │ │ └── UserFactory.php │ │ ├── migrations │ │ │ ├── 2014_10_12_000000_create_users_table.php │ │ │ └── 2014_10_12_100000_create_password_resets_table.php │ │ └── seeds │ │ │ └── DatabaseSeeder.php │ │ ├── index.html │ │ ├── phpunit.xml │ │ ├── public │ │ ├── .htaccess │ │ ├── css │ │ │ └── app.css │ │ ├── favicon.ico │ │ ├── index.php │ │ ├── js │ │ │ └── app.js │ │ ├── robots.txt │ │ ├── svg │ │ │ ├── 403.svg │ │ │ ├── 404.svg │ │ │ ├── 500.svg │ │ │ └── 503.svg │ │ └── web.config │ │ ├── readme.md │ │ ├── resources │ │ ├── js │ │ │ ├── app.js │ │ │ ├── bootstrap.js │ │ │ └── components │ │ │ │ └── ExampleComponent.vue │ │ ├── lang │ │ │ └── en │ │ │ │ ├── auth.php │ │ │ │ ├── pagination.php │ │ │ │ ├── passwords.php │ │ │ │ └── validation.php │ │ ├── sass │ │ │ ├── _variables.scss │ │ │ └── app.scss │ │ └── views │ │ │ └── welcome.blade.php │ │ ├── routes │ │ ├── api.php │ │ ├── channels.php │ │ ├── console.php │ │ └── web.php │ │ ├── server.php │ │ ├── storage │ │ ├── app │ │ │ ├── .gitignore │ │ │ └── public │ │ │ │ └── .gitignore │ │ ├── framework │ │ │ ├── .gitignore │ │ │ ├── cache │ │ │ │ └── .gitignore │ │ │ ├── sessions │ │ │ │ └── .gitignore │ │ │ ├── testing │ │ │ │ └── .gitignore │ │ │ └── views │ │ │ │ └── .gitignore │ │ └── logs │ │ │ └── .gitignore │ │ ├── tests │ │ ├── CreatesApplication.php │ │ ├── Feature │ │ │ └── ExampleTest.php │ │ ├── TestCase.php │ │ └── Unit │ │ │ └── ExampleTest.php │ │ └── webpack.mix.js ├── php7-phalcon3 │ ├── README.md │ ├── conf.d │ │ └── default.conf │ ├── data │ │ └── .gitignore │ ├── docker-compose.yml │ ├── php7-ini │ │ └── php7.ini │ └── www │ │ ├── index.html │ │ ├── index.php │ │ └── info.php └── php7-yii3 │ ├── README.md │ ├── conf.d │ └── default.conf │ ├── data │ └── .gitignore │ ├── docker-compose.yml │ ├── php7-ini │ └── php7.ini │ └── www │ ├── index.html │ ├── index.php │ └── info.php ├── package-version.txt ├── project-demo ├── lemp-stack │ ├── README.md │ ├── build │ │ └── php7fpm │ │ │ └── Dockerfile │ ├── conf.d │ │ ├── default.conf │ │ └── nginx.conf │ ├── database │ │ └── mysql │ │ │ ├── backup │ │ │ └── .gitignore │ │ │ └── data │ │ │ └── .gitignore │ ├── docker-compose.yml │ ├── php7-ini │ │ └── php7.ini │ ├── vhosts │ │ └── .gitignore │ └── www │ │ ├── index.html │ │ ├── index.php │ │ └── info.php ├── load-balancing-layer-4 │ ├── .gitignore │ ├── README.md │ ├── balance │ │ └── haproxy.cfg │ ├── build │ │ └── php7fpm │ │ │ └── Dockerfile │ ├── conf.d │ │ ├── default.conf │ │ ├── nginx.conf │ │ └── php7.ini │ ├── docker-compose.yml │ └── www │ │ ├── check.txt │ │ ├── index.html │ │ ├── index.php │ │ └── info.php ├── multi-domain │ ├── .gitignore │ ├── README.md │ ├── balance │ │ ├── conf.d │ │ │ ├── demo.com.conf │ │ │ └── nginx.conf │ │ └── vhosts │ │ │ ├── main.demo.com.conf │ │ │ ├── site1.demo.com.conf │ │ │ ├── site2.demo.com.conf │ │ │ └── site3.demo.com.conf │ ├── database │ │ ├── mariadb │ │ │ ├── backup │ │ │ │ └── .gitignore │ │ │ ├── data │ │ │ │ └── .gitignore │ │ │ └── mysql.cnf │ │ └── mongodb │ │ │ ├── backup │ │ │ └── .gitignore │ │ │ ├── data │ │ │ └── .gitignore │ │ │ └── mongod.conf │ ├── docker-compose.yml │ ├── main.demo.com │ │ ├── index.html │ │ ├── index.php │ │ └── info.php │ ├── site1.demo.com │ │ ├── index.html │ │ ├── index.php │ │ └── info.php │ ├── site2.demo.com │ │ ├── index.html │ │ ├── index.php │ │ └── info.php │ ├── site3.demo.com │ │ ├── index.html │ │ ├── index.php │ │ └── info.php │ └── webserver │ │ ├── build │ │ └── php7fpm │ │ │ └── Dockerfile │ │ ├── conf.d │ │ └── nginx.conf │ │ ├── php7-conf │ │ ├── php7fpm1.conf │ │ └── php7fpm2.conf │ │ ├── php7-ini │ │ └── php7.ini │ │ ├── sites │ │ ├── main.demo.com.conf │ │ ├── site1.demo.com.conf │ │ ├── site2.demo.com.conf │ │ └── site3.demo.com.conf │ │ └── www │ │ ├── index.html │ │ ├── index.php │ │ └── info.php ├── node-mongo-api │ ├── .gitignore │ ├── app │ │ ├── Dockerfile │ │ ├── package.json │ │ ├── schema │ │ │ ├── auth.js │ │ │ └── user.js │ │ ├── server.js │ │ ├── setting │ │ │ ├── database.js │ │ │ └── service.js │ │ └── v1.0 │ │ │ └── routers │ │ │ ├── auth.js │ │ │ └── users.js │ ├── deploy │ │ ├── backup │ │ │ └── .gitignore │ │ ├── data │ │ │ └── .gitignore │ │ └── note.txt │ └── docker-compose.yml └── wordpress-stack │ ├── build │ └── Dockerfile │ ├── conf.d │ ├── default.conf │ ├── nginx.conf │ ├── php7.ini │ └── php7.ini-production.txt │ ├── database │ ├── backup │ │ ├── mongo │ │ │ └── .gitignore │ │ └── sql │ │ │ └── .gitignore │ ├── mongo │ │ └── .gitignore │ └── sql │ │ └── .gitignore │ ├── docker-compose.yml │ └── www │ └── index.html └── ubuntu-install ├── ubuntu-18.04-install-node-6.x.sh ├── ubuntu-18.04-install-node-8.x.sh └── ubuntu-18.04-install-node-9.x.sh /docker-build/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-build/.DS_Store -------------------------------------------------------------------------------- /docker-build/laravel11-with-php83/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.3.31-fpm 2 | LABEL maintainer="Eakkabin Jaikeawma " 3 | 4 | RUN set -xe && \ 5 | apt-get update && apt-get install -y build-essential curl git gzip libzip-dev zip libonig-dev --no-install-recommends && \ 6 | docker-php-ext-install -j$(nproc) iconv pdo mysqli pdo_mysql mbstring sockets zip && \ 7 | docker-php-ext-configure zip && \ 8 | ## Download PHP Composer ## 9 | curl -sS https://getcomposer.org/installer | php && chmod +x composer.phar && \ 10 | mv composer.phar /usr/local/bin/composer && \ 11 | ## Download Mongo DB ## 12 | git clone https://github.com/mongodb/mongo-php-driver.git && cd mongo-php-driver && \ 13 | git submodule update --init && phpize && ./configure && make all && make install && \ 14 | echo "[mongodb]" >> /usr/local/etc/php/conf.d/mongodb.ini && \ 15 | echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini && \ 16 | cd .. && \ 17 | ## Remove all temp files ## 18 | rm -r \ 19 | ${PWD}/mongo-php-driver \ 20 | && \ 21 | apt-get clean && apt autoremove -y && \ 22 | rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* 23 | 24 | WORKDIR /usr/share/nginx/html 25 | EXPOSE 9000 26 | 27 | CMD ["php-fpm"] -------------------------------------------------------------------------------- /docker-build/laravel11-with-php83/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | # ====================================================================== 4 | # PHP 5 | # ====================================================================== 6 | 7 | php: 8 | build: ./ 9 | container_name: php83fpm-laravel11 10 | working_dir: /usr/share/nginx/html 11 | restart: always 12 | environment: 13 | - VIRTUAL_PORT=91 14 | - TERM=xterm 15 | volumes: 16 | - ./nginx/www:/usr/share/nginx/html 17 | ports: 18 | - "91:9000" 19 | networks: 20 | - "php83fpm_nginx_network" 21 | 22 | # ====================================================================== 23 | # Web Server 24 | # ====================================================================== 25 | 26 | nginx: 27 | image: nginx:1.27.3-alpine 28 | container_name: php83fpm-nginx 29 | working_dir: /usr/share/nginx/html 30 | restart: always 31 | environment: 32 | - VIRTUAL_HOST=localhost 33 | - VIRTUAL_PORT=81 34 | - NGINX_HOST=localhost 35 | - NGINX_PORT=81 36 | - TERM=xterm 37 | volumes: 38 | - ./nginx/www:/usr/share/nginx/html 39 | - ./nginx/localhost.conf:/etc/nginx/conf.d/default.conf 40 | links: 41 | - "php:php83fpm" 42 | ports: 43 | - "81:80" 44 | networks: 45 | - "php83fpm_nginx_network" 46 | 47 | networks: 48 | php83fpm_nginx_network: 49 | driver: bridge -------------------------------------------------------------------------------- /docker-build/laravel11-with-php83/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php83fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | if (!-f $document_root$fastcgi_script_name) { 28 | return 404; 29 | } 30 | 31 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 32 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 33 | fastcgi_param PATH_INFO $fastcgi_path_info; 34 | 35 | fastcgi_intercept_errors off; 36 | fastcgi_buffer_size 16k; 37 | fastcgi_buffers 4 16k; 38 | 39 | fastcgi_hide_header X-Powered-By; 40 | 41 | } 42 | 43 | access_log off; 44 | error_log /var/log/nginx/lotto.com-access.error.log; 45 | error_page 401 403 404 /404.html; 46 | 47 | } -------------------------------------------------------------------------------- /docker-build/laravel11-with-php83/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/mongodb-with-php74/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.4.33-fpm 2 | LABEL maintainer="Eakkabin Jaikeawma " 3 | 4 | RUN set -xe && \ 5 | apt-get update && apt-get install -y build-essential curl git gzip --no-install-recommends && \ 6 | docker-php-ext-install -j$(nproc) iconv pdo mysqli pdo_mysql sockets && \ 7 | # Download PHP Composer 8 | curl -sS https://getcomposer.org/installer | php && chmod +x composer.phar && \ 9 | mv composer.phar /usr/local/bin/composer && \ 10 | # Download Mongo DB 11 | git clone https://github.com/mongodb/mongo-php-driver.git && cd mongo-php-driver && \ 12 | git submodule update --init && phpize && ./configure && make all && make install && \ 13 | echo "[mongodb]" >> /usr/local/etc/php/conf.d/mongodb.ini && \ 14 | echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini && \ 15 | cd .. && \ 16 | # Remove all temp files 17 | rm -r \ 18 | ${PWD}/mongo-php-driver \ 19 | && \ 20 | apt-get clean && apt autoremove -y && \ 21 | rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* 22 | 23 | WORKDIR /usr/share/nginx/html 24 | EXPOSE 9000 25 | 26 | CMD ["php-fpm"] 27 | -------------------------------------------------------------------------------- /docker-build/mongodb-with-php74/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu22.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu22.sh 28 | ``` 29 | 30 | 31 | Build MongoDB PHP Mobule. 32 | --------------------------------------------------- 33 | 34 | ``` 35 | docker build -t build/:7.4.33 . 36 | ``` 37 | 38 | 39 | ``` 40 | docker stop docker-php74mongo && docker rm docker-php74mongo 41 | ``` 42 | -------------------------------------------------------------------------------- /docker-build/mongodb-with-php74/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | # ====================================================================== 4 | # PHP 5 | # ====================================================================== 6 | 7 | php: 8 | build: ./ 9 | container_name: php74fpm-nginx-php 10 | working_dir: /usr/share/nginx/html 11 | restart: always 12 | environment: 13 | - VIRTUAL_PORT=91 14 | - TERM=xterm 15 | volumes: 16 | - ./nginx/www:/usr/share/nginx/html 17 | ports: 18 | - "91:9000" 19 | networks: 20 | - "php74fpm_nginx_network" 21 | 22 | # ====================================================================== 23 | # Web Server 24 | # ====================================================================== 25 | 26 | nginx: 27 | image: nginx:1.27.3-alpine 28 | container_name: php74fpm-nginx 29 | working_dir: /usr/share/nginx/html 30 | restart: always 31 | environment: 32 | - VIRTUAL_HOST=localhost 33 | - VIRTUAL_PORT=81 34 | - NGINX_HOST=localhost 35 | - NGINX_PORT=81 36 | - TERM=xterm 37 | volumes: 38 | - ./nginx/www:/usr/share/nginx/html 39 | - ./nginx/localhost.conf:/etc/nginx/conf.d/default.conf 40 | links: 41 | - "php:php74fpm" 42 | ports: 43 | - "81:80" 44 | networks: 45 | - "php74fpm_nginx_network" 46 | 47 | networks: 48 | php74fpm_nginx_network: 49 | driver: bridge -------------------------------------------------------------------------------- /docker-build/mongodb-with-php74/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php74fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | if (!-f $document_root$fastcgi_script_name) { 28 | return 404; 29 | } 30 | 31 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 32 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 33 | fastcgi_param PATH_INFO $fastcgi_path_info; 34 | 35 | fastcgi_intercept_errors off; 36 | fastcgi_buffer_size 16k; 37 | fastcgi_buffers 4 16k; 38 | 39 | fastcgi_hide_header X-Powered-By; 40 | 41 | } 42 | 43 | access_log off; 44 | error_log /var/log/nginx/lotto.com-access.error.log; 45 | error_page 401 403 404 /404.html; 46 | 47 | } -------------------------------------------------------------------------------- /docker-build/mongodb-with-php74/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/mongodb-with-php83/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.3.16-fpm 2 | LABEL maintainer="Eakkabin Jaikeawma " 3 | 4 | RUN set -xe && \ 5 | apt-get update && apt-get install -y build-essential curl git gzip --no-install-recommends && \ 6 | docker-php-ext-install -j$(nproc) iconv pdo mysqli pdo_mysql sockets && \ 7 | # Download PHP Composer 8 | curl -sS https://getcomposer.org/installer | php && chmod +x composer.phar && \ 9 | mv composer.phar /usr/local/bin/composer && \ 10 | # Download Mongo DB 11 | git clone https://github.com/mongodb/mongo-php-driver.git && cd mongo-php-driver && \ 12 | git submodule update --init && phpize && ./configure && make all && make install && \ 13 | echo "[mongodb]" >> /usr/local/etc/php/conf.d/mongodb.ini && \ 14 | echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini && \ 15 | cd .. && \ 16 | # Remove all temp files 17 | rm -r \ 18 | ${PWD}/mongo-php-driver \ 19 | && \ 20 | apt-get clean && apt autoremove -y && \ 21 | rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* 22 | 23 | WORKDIR /usr/share/nginx/html 24 | EXPOSE 9000 25 | 26 | CMD ["php-fpm"] 27 | -------------------------------------------------------------------------------- /docker-build/mongodb-with-php83/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu22.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu22.sh 28 | ``` 29 | 30 | 31 | Build MongoDB PHP Mobule. 32 | --------------------------------------------------- 33 | 34 | ``` 35 | docker build -t build/:7.4.33 . 36 | ``` 37 | 38 | 39 | ``` 40 | docker stop docker-php74mongo && docker rm docker-php74mongo 41 | ``` 42 | -------------------------------------------------------------------------------- /docker-build/mongodb-with-php83/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | # ====================================================================== 4 | # PHP 5 | # ====================================================================== 6 | 7 | php: 8 | build: ./ 9 | container_name: php83fpm-nginx-php 10 | working_dir: /usr/share/nginx/html 11 | restart: always 12 | environment: 13 | - VIRTUAL_PORT=91 14 | - TERM=xterm 15 | volumes: 16 | - ./nginx/www:/usr/share/nginx/html 17 | ports: 18 | - "91:9000" 19 | networks: 20 | - "php83fpm_nginx_network" 21 | 22 | # ====================================================================== 23 | # Web Server 24 | # ====================================================================== 25 | 26 | nginx: 27 | image: nginx:1.27.3-alpine 28 | container_name: php83fpm-nginx 29 | working_dir: /usr/share/nginx/html 30 | restart: always 31 | environment: 32 | - VIRTUAL_HOST=localhost 33 | - VIRTUAL_PORT=81 34 | - NGINX_HOST=localhost 35 | - NGINX_PORT=81 36 | - TERM=xterm 37 | volumes: 38 | - ./nginx/www:/usr/share/nginx/html 39 | - ./nginx/localhost.conf:/etc/nginx/conf.d/default.conf 40 | links: 41 | - "php:php83fpm" 42 | ports: 43 | - "81:80" 44 | networks: 45 | - "php83fpm_nginx_network" 46 | 47 | networks: 48 | php83fpm_nginx_network: 49 | driver: bridge -------------------------------------------------------------------------------- /docker-build/mongodb-with-php83/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php83fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | if (!-f $document_root$fastcgi_script_name) { 28 | return 404; 29 | } 30 | 31 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 32 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 33 | fastcgi_param PATH_INFO $fastcgi_path_info; 34 | 35 | fastcgi_intercept_errors off; 36 | fastcgi_buffer_size 16k; 37 | fastcgi_buffers 4 16k; 38 | 39 | fastcgi_hide_header X-Powered-By; 40 | 41 | } 42 | 43 | access_log off; 44 | error_log /var/log/nginx/lotto.com-access.error.log; 45 | error_page 401 403 404 /404.html; 46 | 47 | } -------------------------------------------------------------------------------- /docker-build/mongodb-with-php83/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/node-with-restapi/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-build/node-with-restapi/.DS_Store -------------------------------------------------------------------------------- /docker-build/node-with-restapi/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Build NODE RESTAPI 32 | --------------------------------------------------- 33 | 34 | 35 | ``` 36 | cd /build/docker-awesome/docker-build/node-with-restapi/build 37 | docker build -t build/noderestapi:8.9.4 . 38 | ``` 39 | 40 | 41 | ``` 42 | cd /build/docker-awesome/docker-build/node-with-restapi/app 43 | npm install 44 | ``` 45 | 46 | 47 | ``` 48 | cd /build/docker-awesome/docker-build/node-with-restapi 49 | docker-compose up -d && docker ps -a 50 | ``` 51 | 52 | 53 | Example 54 | --------------------------------------------------- 55 | 56 | ``` 57 | http://localhost:8081 58 | ``` -------------------------------------------------------------------------------- /docker-build/node-with-restapi/app/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-build/node-with-restapi/app/.DS_Store -------------------------------------------------------------------------------- /docker-build/node-with-restapi/app/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules -------------------------------------------------------------------------------- /docker-build/node-with-restapi/app/app.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | 4 | app.get('/', (req, res) => res.send('Hello World!')) 5 | app.listen(3000, () => console.log('Example app listening on port 3000!')) -------------------------------------------------------------------------------- /docker-build/node-with-restapi/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docker-node-api", 3 | "version": "1.0.0", 4 | "author": "Max Eakkabin Jaikeawma ", 5 | "scripts": { 6 | "start": "nodemon app.js" 7 | }, 8 | "dependencies": { 9 | "async": "^2.6.4", 10 | "body-parser": "^1.20.3", 11 | "cookie-parser": "^1.4.7", 12 | "express": "^4.21.2", 13 | "fs": "^0.0.2", 14 | "jsonwebtoken": "^8.5.1", 15 | "mongoose": "^5.13.23", 16 | "morgan": "^1.10.0", 17 | "nodemon": "^3.1.9", 18 | "promise": "^8.3.0" 19 | }, 20 | "engineStrict": true, 21 | "engines": { 22 | "node": ">= 20.18", 23 | "npm": ">= 10.9" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /docker-build/node-with-restapi/build/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:22.13.1 2 | LABEL maintainer="Eakkabin Jaikeawma " 3 | 4 | # COPY . /usr/src/app 5 | # WORKDIR /usr/src/app 6 | 7 | RUN npm install nodemon@^1.15.0 -g 8 | 9 | EXPOSE 3000 10 | 11 | CMD ["npm", "start"] -------------------------------------------------------------------------------- /docker-build/node-with-restapi/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | 5 | node: 6 | build: ./build 7 | container_name: node-api 8 | working_dir: /usr/src/app 9 | restart: always 10 | environment: 11 | - NODE_ENV=production 12 | - VIRTUAL_PORT=81 13 | - TERM=xterm 14 | volumes: 15 | - ./app:/usr/src/app 16 | ports: 17 | - "81:3000" 18 | networks: 19 | - node_api_network 20 | command: "npm start" 21 | 22 | networks: 23 | node_api_network: 24 | driver: bridge 25 | # ipam: 26 | # driver: default 27 | # config: 28 | # - subnet: 172.80.0.0/24 29 | # gateway: 172.80.0.1 -------------------------------------------------------------------------------- /docker-build/phalcon5-with-php74/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | # ====================================================================== 4 | # PHP 5 | # ====================================================================== 6 | 7 | php: 8 | build: ./ 9 | container_name: php74fpm-phalcon5 10 | working_dir: /usr/share/nginx/html 11 | restart: always 12 | environment: 13 | - VIRTUAL_PORT=91 14 | - TERM=xterm 15 | volumes: 16 | - ./nginx/www:/usr/share/nginx/html 17 | ports: 18 | - "91:9000" 19 | networks: 20 | - "php74fpm_nginx_network" 21 | 22 | # ====================================================================== 23 | # Web Server 24 | # ====================================================================== 25 | 26 | nginx: 27 | image: nginx:1.27.3-alpine 28 | container_name: php74fpm-nginx 29 | working_dir: /usr/share/nginx/html 30 | restart: always 31 | environment: 32 | - VIRTUAL_HOST=localhost 33 | - VIRTUAL_PORT=81 34 | - NGINX_HOST=localhost 35 | - NGINX_PORT=81 36 | - TERM=xterm 37 | volumes: 38 | - ./nginx/www:/usr/share/nginx/html 39 | - ./nginx/localhost.conf:/etc/nginx/conf.d/default.conf 40 | links: 41 | - "php:php74fpm" 42 | ports: 43 | - "81:80" 44 | networks: 45 | - "php74fpm_nginx_network" 46 | 47 | networks: 48 | php74fpm_nginx_network: 49 | driver: bridge 50 | -------------------------------------------------------------------------------- /docker-build/phalcon5-with-php74/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php74fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | 28 | if (!-f $document_root$fastcgi_script_name) { 29 | return 404; 30 | } 31 | 32 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 33 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 34 | fastcgi_param PATH_INFO $fastcgi_path_info; 35 | 36 | fastcgi_intercept_errors off; 37 | fastcgi_buffer_size 16k; 38 | fastcgi_buffers 4 16k; 39 | 40 | fastcgi_hide_header X-Powered-By; 41 | 42 | } 43 | 44 | access_log off; 45 | error_log /var/log/nginx/lotto.com-access.error.log; 46 | error_page 401 403 404 /404.html; 47 | 48 | } -------------------------------------------------------------------------------- /docker-build/phalcon5-with-php74/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/phalcon5-with-php80/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | # ====================================================================== 4 | # PHP 5 | # ====================================================================== 6 | 7 | php: 8 | build: ./ 9 | container_name: php80fpm-phalcon5 10 | working_dir: /usr/share/nginx/html 11 | restart: always 12 | environment: 13 | - VIRTUAL_PORT=91 14 | - TERM=xterm 15 | volumes: 16 | - ./nginx/www:/usr/share/nginx/html 17 | ports: 18 | - "91:9000" 19 | networks: 20 | - "php80fpm_nginx_network" 21 | 22 | # ====================================================================== 23 | # Web Server 24 | # ====================================================================== 25 | 26 | nginx: 27 | image: nginx:1.27.3-alpine 28 | container_name: php80fpm-nginx 29 | working_dir: /usr/share/nginx/html 30 | restart: always 31 | environment: 32 | - VIRTUAL_HOST=localhost 33 | - VIRTUAL_PORT=81 34 | - NGINX_HOST=localhost 35 | - NGINX_PORT=81 36 | - TERM=xterm 37 | volumes: 38 | - ./nginx/www:/usr/share/nginx/html 39 | - ./nginx/localhost.conf:/etc/nginx/conf.d/default.conf 40 | links: 41 | - "php:php80fpm" 42 | ports: 43 | - "81:80" 44 | networks: 45 | - "php80fpm_nginx_network" 46 | 47 | networks: 48 | php80fpm_nginx_network: 49 | driver: bridge 50 | -------------------------------------------------------------------------------- /docker-build/phalcon5-with-php80/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php80fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | 28 | if (!-f $document_root$fastcgi_script_name) { 29 | return 404; 30 | } 31 | 32 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 33 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 34 | fastcgi_param PATH_INFO $fastcgi_path_info; 35 | 36 | fastcgi_intercept_errors off; 37 | fastcgi_buffer_size 16k; 38 | fastcgi_buffers 4 16k; 39 | 40 | fastcgi_hide_header X-Powered-By; 41 | 42 | } 43 | 44 | access_log off; 45 | error_log /var/log/nginx/lotto.com-access.error.log; 46 | error_page 401 403 404 /404.html; 47 | 48 | } -------------------------------------------------------------------------------- /docker-build/phalcon5-with-php80/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/phalcon5-with-php81/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php81fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | 28 | if (!-f $document_root$fastcgi_script_name) { 29 | return 404; 30 | } 31 | 32 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 33 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 34 | fastcgi_param PATH_INFO $fastcgi_path_info; 35 | 36 | fastcgi_intercept_errors off; 37 | fastcgi_buffer_size 16k; 38 | fastcgi_buffers 4 16k; 39 | 40 | fastcgi_hide_header X-Powered-By; 41 | 42 | } 43 | 44 | access_log off; 45 | error_log /var/log/nginx/lotto.com-access.error.log; 46 | error_page 401 403 404 /404.html; 47 | 48 | } -------------------------------------------------------------------------------- /docker-build/phalcon5-with-php81/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/phalcon5-with-php82/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php82fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | 28 | if (!-f $document_root$fastcgi_script_name) { 29 | return 404; 30 | } 31 | 32 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 33 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 34 | fastcgi_param PATH_INFO $fastcgi_path_info; 35 | 36 | fastcgi_intercept_errors off; 37 | fastcgi_buffer_size 16k; 38 | fastcgi_buffers 4 16k; 39 | 40 | fastcgi_hide_header X-Powered-By; 41 | 42 | } 43 | 44 | access_log off; 45 | error_log /var/log/nginx/lotto.com-access.error.log; 46 | error_page 401 403 404 /404.html; 47 | 48 | } -------------------------------------------------------------------------------- /docker-build/phalcon5-with-php82/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/phalcon5-with-php83/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php83fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | 28 | if (!-f $document_root$fastcgi_script_name) { 29 | return 404; 30 | } 31 | 32 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 33 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 34 | fastcgi_param PATH_INFO $fastcgi_path_info; 35 | 36 | fastcgi_intercept_errors off; 37 | fastcgi_buffer_size 16k; 38 | fastcgi_buffers 4 16k; 39 | 40 | fastcgi_hide_header X-Powered-By; 41 | 42 | } 43 | 44 | access_log off; 45 | error_log /var/log/nginx/lotto.com-access.error.log; 46 | error_page 401 403 404 /404.html; 47 | 48 | } -------------------------------------------------------------------------------- /docker-build/phalcon5-with-php83/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/php74fpm-with-nginx/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | # ====================================================================== 4 | # PHP 5 | # ====================================================================== 6 | 7 | php: 8 | build: ./ 9 | container_name: php74fpm-php 10 | working_dir: /usr/share/nginx/html 11 | restart: always 12 | environment: 13 | - VIRTUAL_PORT=91 14 | - TERM=xterm 15 | volumes: 16 | - ./nginx/www:/usr/share/nginx/html 17 | ports: 18 | - "91:9000" 19 | networks: 20 | - "php74fpm_nginx_network" 21 | 22 | # ====================================================================== 23 | # Web Server 24 | # ====================================================================== 25 | 26 | nginx: 27 | image: nginx:1.27.3-alpine 28 | container_name: php74fpm-nginx 29 | working_dir: /usr/share/nginx/html 30 | restart: always 31 | environment: 32 | - VIRTUAL_HOST=localhost 33 | - VIRTUAL_PORT=81 34 | - NGINX_HOST=localhost 35 | - NGINX_PORT=81 36 | - TERM=xterm 37 | volumes: 38 | - ./nginx/www:/usr/share/nginx/html 39 | - ./nginx/localhost.conf:/etc/nginx/conf.d/default.conf 40 | links: 41 | - "php:php74fpm" 42 | ports: 43 | - "81:80" 44 | networks: 45 | - "php74fpm_nginx_network" 46 | 47 | networks: 48 | php74fpm_nginx_network: 49 | driver: bridge 50 | -------------------------------------------------------------------------------- /docker-build/php74fpm-with-nginx/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php74fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | 28 | if (!-f $document_root$fastcgi_script_name) { 29 | return 404; 30 | } 31 | 32 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 33 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 34 | fastcgi_param PATH_INFO $fastcgi_path_info; 35 | 36 | fastcgi_intercept_errors off; 37 | fastcgi_buffer_size 16k; 38 | fastcgi_buffers 4 16k; 39 | 40 | fastcgi_hide_header X-Powered-By; 41 | 42 | } 43 | 44 | access_log off; 45 | error_log /var/log/nginx/lotto.com-access.error.log; 46 | error_page 401 403 404 /404.html; 47 | 48 | } -------------------------------------------------------------------------------- /docker-build/php74fpm-with-nginx/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/php80fpm-with-nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.0.30-fpm 2 | LABEL maintainer="Eakkabin Jaikeawma " 3 | 4 | RUN set -xe && \ 5 | apt-get update && apt-get install -y build-essential curl git gzip libzip-dev zip libonig-dev --no-install-recommends && \ 6 | docker-php-ext-install -j$(nproc) iconv pdo mysqli pdo_mysql mbstring sockets zip && \ 7 | docker-php-ext-configure zip && \ 8 | # Download PHP Composer 9 | curl -sS https://getcomposer.org/installer | php && chmod +x composer.phar && \ 10 | mv composer.phar /usr/local/bin/composer && \ 11 | # Download Mongo DB 12 | git clone https://github.com/mongodb/mongo-php-driver.git && cd mongo-php-driver && \ 13 | git submodule update --init && phpize && ./configure && make all && make install && \ 14 | echo "[mongodb]" >> /usr/local/etc/php/conf.d/mongodb.ini && \ 15 | echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini && \ 16 | cd .. && \ 17 | # Remove all temp files 18 | rm -r \ 19 | ${PWD}/mongo-php-driver \ 20 | && \ 21 | apt-get clean && apt autoremove -y && \ 22 | rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* 23 | 24 | WORKDIR /usr/share/nginx/html 25 | EXPOSE 9000 26 | 27 | CMD ["php-fpm"] -------------------------------------------------------------------------------- /docker-build/php80fpm-with-nginx/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | # ====================================================================== 4 | # PHP 5 | # ====================================================================== 6 | 7 | php: 8 | build: ./ 9 | container_name: php80fpm-php 10 | working_dir: /usr/share/nginx/html 11 | restart: always 12 | environment: 13 | - VIRTUAL_PORT=91 14 | - TERM=xterm 15 | volumes: 16 | - ./nginx/www:/usr/share/nginx/html 17 | ports: 18 | - "91:9000" 19 | networks: 20 | - "php80fpm_nginx_network" 21 | 22 | # ====================================================================== 23 | # Web Server 24 | # ====================================================================== 25 | 26 | nginx: 27 | image: nginx:1.27.3-alpine 28 | container_name: php80fpm-nginx 29 | working_dir: /usr/share/nginx/html 30 | restart: always 31 | environment: 32 | - VIRTUAL_HOST=localhost 33 | - VIRTUAL_PORT=81 34 | - NGINX_HOST=localhost 35 | - NGINX_PORT=81 36 | - TERM=xterm 37 | volumes: 38 | - ./nginx/www:/usr/share/nginx/html 39 | - ./nginx/localhost.conf:/etc/nginx/conf.d/default.conf 40 | links: 41 | - "php:php80fpm" 42 | ports: 43 | - "81:80" 44 | networks: 45 | - "php80fpm_nginx_network" 46 | 47 | networks: 48 | php80fpm_nginx_network: 49 | driver: bridge 50 | -------------------------------------------------------------------------------- /docker-build/php80fpm-with-nginx/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php80fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | 28 | if (!-f $document_root$fastcgi_script_name) { 29 | return 404; 30 | } 31 | 32 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 33 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 34 | fastcgi_param PATH_INFO $fastcgi_path_info; 35 | 36 | fastcgi_intercept_errors off; 37 | fastcgi_buffer_size 16k; 38 | fastcgi_buffers 4 16k; 39 | 40 | fastcgi_hide_header X-Powered-By; 41 | 42 | } 43 | 44 | access_log off; 45 | error_log /var/log/nginx/lotto.com-access.error.log; 46 | error_page 401 403 404 /404.html; 47 | 48 | } -------------------------------------------------------------------------------- /docker-build/php80fpm-with-nginx/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/php81fpm-with-nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.1.31-fpm 2 | LABEL maintainer="Eakkabin Jaikeawma " 3 | 4 | RUN set -xe && \ 5 | apt-get update && apt-get install -y build-essential curl git gzip libzip-dev zip libonig-dev --no-install-recommends && \ 6 | docker-php-ext-install -j$(nproc) iconv pdo mysqli pdo_mysql mbstring sockets zip && \ 7 | docker-php-ext-configure zip && \ 8 | # Download PHP Composer 9 | curl -sS https://getcomposer.org/installer | php && chmod +x composer.phar && \ 10 | mv composer.phar /usr/local/bin/composer && \ 11 | # Download Mongo DB 12 | git clone https://github.com/mongodb/mongo-php-driver.git && cd mongo-php-driver && \ 13 | git submodule update --init && phpize && ./configure && make all && make install && \ 14 | echo "[mongodb]" >> /usr/local/etc/php/conf.d/mongodb.ini && \ 15 | echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini && \ 16 | cd .. && \ 17 | # Remove all temp files 18 | rm -r \ 19 | ${PWD}/mongo-php-driver \ 20 | && \ 21 | apt-get clean && apt autoremove -y && \ 22 | rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* 23 | 24 | WORKDIR /usr/share/nginx/html 25 | EXPOSE 9000 26 | 27 | CMD ["php-fpm"] 28 | -------------------------------------------------------------------------------- /docker-build/php81fpm-with-nginx/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | # ====================================================================== 4 | # PHP 5 | # ====================================================================== 6 | 7 | php: 8 | build: ./ 9 | container_name: php81fpm-php 10 | working_dir: /usr/share/nginx/html 11 | restart: always 12 | environment: 13 | - VIRTUAL_PORT=91 14 | - TERM=xterm 15 | volumes: 16 | - ./nginx/www:/usr/share/nginx/html 17 | ports: 18 | - "91:9000" 19 | networks: 20 | - "php81fpm_nginx_network" 21 | 22 | # ====================================================================== 23 | # Web Server 24 | # ====================================================================== 25 | 26 | nginx: 27 | image: nginx:1.27.3-alpine 28 | container_name: php81fpm-nginx 29 | working_dir: /usr/share/nginx/html 30 | restart: always 31 | environment: 32 | - VIRTUAL_HOST=localhost 33 | - VIRTUAL_PORT=81 34 | - NGINX_HOST=localhost 35 | - NGINX_PORT=81 36 | - TERM=xterm 37 | volumes: 38 | - ./nginx/www:/usr/share/nginx/html 39 | - ./nginx/localhost.conf:/etc/nginx/conf.d/default.conf 40 | links: 41 | - "php:php81fpm" 42 | ports: 43 | - "81:80" 44 | networks: 45 | - "php81fpm_nginx_network" 46 | 47 | networks: 48 | php81fpm_nginx_network: 49 | driver: bridge 50 | -------------------------------------------------------------------------------- /docker-build/php81fpm-with-nginx/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php81fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | 28 | if (!-f $document_root$fastcgi_script_name) { 29 | return 404; 30 | } 31 | 32 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 33 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 34 | fastcgi_param PATH_INFO $fastcgi_path_info; 35 | 36 | fastcgi_intercept_errors off; 37 | fastcgi_buffer_size 16k; 38 | fastcgi_buffers 4 16k; 39 | 40 | fastcgi_hide_header X-Powered-By; 41 | 42 | } 43 | 44 | access_log off; 45 | error_log /var/log/nginx/lotto.com-access.error.log; 46 | error_page 401 403 404 /404.html; 47 | 48 | } -------------------------------------------------------------------------------- /docker-build/php81fpm-with-nginx/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/php82fpm-with-nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.2.27-fpm 2 | LABEL maintainer="Eakkabin Jaikeawma " 3 | 4 | RUN set -xe && \ 5 | apt-get update && apt-get install -y build-essential curl git gzip libzip-dev zip libonig-dev --no-install-recommends && \ 6 | docker-php-ext-install -j$(nproc) iconv pdo mysqli pdo_mysql mbstring sockets zip && \ 7 | docker-php-ext-configure zip && \ 8 | ## Download PHP Composer ## 9 | curl -sS https://getcomposer.org/installer | php && chmod +x composer.phar && \ 10 | mv composer.phar /usr/local/bin/composer && \ 11 | ## Download Mongo DB ## 12 | git clone https://github.com/mongodb/mongo-php-driver.git && cd mongo-php-driver && \ 13 | git submodule update --init && phpize && ./configure && make all && make install && \ 14 | echo "[mongodb]" >> /usr/local/etc/php/conf.d/mongodb.ini && \ 15 | echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini && \ 16 | cd .. && \ 17 | ## Remove all temp files ## 18 | rm -r \ 19 | ${PWD}/mongo-php-driver \ 20 | && \ 21 | apt-get clean && apt autoremove -y && \ 22 | rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* 23 | 24 | WORKDIR /usr/share/nginx/html 25 | EXPOSE 9000 26 | 27 | CMD ["php-fpm"] 28 | -------------------------------------------------------------------------------- /docker-build/php82fpm-with-nginx/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | # ====================================================================== 4 | # PHP 5 | # ====================================================================== 6 | 7 | php: 8 | build: ./ 9 | container_name: php82fpm-php 10 | working_dir: /usr/share/nginx/html 11 | restart: always 12 | environment: 13 | - VIRTUAL_PORT=91 14 | - TERM=xterm 15 | volumes: 16 | - ./nginx/www:/usr/share/nginx/html 17 | ports: 18 | - "91:9000" 19 | networks: 20 | - "php82fpm_nginx_network" 21 | 22 | # ====================================================================== 23 | # Web Server 24 | # ====================================================================== 25 | 26 | nginx: 27 | image: nginx:1.27.3-alpine 28 | container_name: php82fpm-nginx 29 | working_dir: /usr/share/nginx/html 30 | restart: always 31 | environment: 32 | - VIRTUAL_HOST=localhost 33 | - VIRTUAL_PORT=81 34 | - NGINX_HOST=localhost 35 | - NGINX_PORT=81 36 | - TERM=xterm 37 | volumes: 38 | - ./nginx/www:/usr/share/nginx/html 39 | - ./nginx/localhost.conf:/etc/nginx/conf.d/default.conf 40 | links: 41 | - "php:php82fpm" 42 | ports: 43 | - "81:80" 44 | networks: 45 | - "php82fpm_nginx_network" 46 | 47 | networks: 48 | php82fpm_nginx_network: 49 | driver: bridge 50 | -------------------------------------------------------------------------------- /docker-build/php82fpm-with-nginx/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php82fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | 28 | if (!-f $document_root$fastcgi_script_name) { 29 | return 404; 30 | } 31 | 32 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 33 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 34 | fastcgi_param PATH_INFO $fastcgi_path_info; 35 | 36 | fastcgi_intercept_errors off; 37 | fastcgi_buffer_size 16k; 38 | fastcgi_buffers 4 16k; 39 | 40 | fastcgi_hide_header X-Powered-By; 41 | 42 | } 43 | 44 | access_log off; 45 | error_log /var/log/nginx/lotto.com-access.error.log; 46 | error_page 401 403 404 /404.html; 47 | 48 | } -------------------------------------------------------------------------------- /docker-build/php82fpm-with-nginx/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/php82fpm-with-wordpress/build/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.2.27-fpm 2 | LABEL maintainer="Eakkabin Jaikeawma " 3 | 4 | RUN set -xe && \ 5 | apt-get update && apt-get install -y curl git gzip libonig-dev libfreetype6-dev libjpeg-dev libmagickwand-dev libpng-dev libzip-dev --no-install-recommends && \ 6 | docker-php-ext-install -j$(nproc) bcmath exif gd mysqli zip mbstring sockets && \ 7 | docker-php-ext-configure gd --with-freetype --with-jpeg && \ 8 | docker-php-ext-configure zip && \ 9 | pecl install imagick && \ 10 | docker-php-ext-enable imagick && \ 11 | ## Download PHP Composer ## 12 | curl -sS https://getcomposer.org/installer | php && chmod +x composer.phar && \ 13 | mv composer.phar /usr/local/bin/composer && \ 14 | # Remove all temp files 15 | apt-get clean && apt autoremove -y && \ 16 | rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* 17 | 18 | WORKDIR /usr/share/nginx/html 19 | EXPOSE 9000 20 | 21 | CMD ["php-fpm"] -------------------------------------------------------------------------------- /docker-build/php82fpm-with-wordpress/conf.d/php82.ini: -------------------------------------------------------------------------------- 1 | # Additional php config 2 | file_uploads = On 3 | 4 | allow_url_fopen = On 5 | allow_url_include = Off 6 | 7 | post_max_size = 64M 8 | 9 | upload_max_filesize = 64M 10 | upload_max_size = 64M 11 | 12 | memory_limit = 128M 13 | 14 | max_file_uploads = 5 15 | max_execution_time = 600 16 | max_input_vars = 1000 17 | max_input_time = 400 18 | 19 | [Date] 20 | date.timezone = Asia/Bangkok 21 | 22 | [Session] 23 | session.name = "SESSID" 24 | session.auto_start = 1 25 | # session.save_handler = "redis" 26 | # session.save_path = "tcp://172.28.0.1:6379?auth=ee14586a07100033ec4a29abb4876735ccab39bf" -------------------------------------------------------------------------------- /docker-build/php82fpm-with-wordpress/db/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /docker-build/php82fpm-with-wordpress/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/php83fpm-with-nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.3.16-fpm 2 | LABEL maintainer="Eakkabin Jaikeawma " 3 | 4 | RUN set -xe && \ 5 | apt-get update && apt-get install -y build-essential curl git gzip libzip-dev zip libonig-dev --no-install-recommends && \ 6 | docker-php-ext-install -j$(nproc) iconv pdo mysqli pdo_mysql mbstring sockets zip && \ 7 | docker-php-ext-configure zip && \ 8 | ## Download PHP Composer ## 9 | curl -sS https://getcomposer.org/installer | php && chmod +x composer.phar && \ 10 | mv composer.phar /usr/local/bin/composer && \ 11 | ## Download Mongo DB ## 12 | git clone https://github.com/mongodb/mongo-php-driver.git && cd mongo-php-driver && \ 13 | git submodule update --init && phpize && ./configure && make all && make install && \ 14 | echo "[mongodb]" >> /usr/local/etc/php/conf.d/mongodb.ini && \ 15 | echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini && \ 16 | cd .. && \ 17 | ## Remove all temp files ## 18 | rm -r \ 19 | ${PWD}/mongo-php-driver \ 20 | && \ 21 | apt-get clean && apt autoremove -y && \ 22 | rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* 23 | 24 | WORKDIR /usr/share/nginx/html 25 | EXPOSE 9000 26 | 27 | CMD ["php-fpm"] 28 | -------------------------------------------------------------------------------- /docker-build/php83fpm-with-nginx/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | # ====================================================================== 4 | # PHP 5 | # ====================================================================== 6 | 7 | php: 8 | build: ./ 9 | container_name: php83fpm-php 10 | working_dir: /usr/share/nginx/html 11 | restart: always 12 | environment: 13 | - VIRTUAL_PORT=91 14 | - TERM=xterm 15 | volumes: 16 | - ./nginx/www:/usr/share/nginx/html 17 | ports: 18 | - "91:9000" 19 | networks: 20 | - "php83fpm_nginx_network" 21 | 22 | # ====================================================================== 23 | # Web Server 24 | # ====================================================================== 25 | 26 | nginx: 27 | image: nginx:1.27.3-alpine 28 | container_name: php83fpm-nginx 29 | working_dir: /usr/share/nginx/html 30 | restart: always 31 | environment: 32 | - VIRTUAL_HOST=localhost 33 | - VIRTUAL_PORT=81 34 | - NGINX_HOST=localhost 35 | - NGINX_PORT=81 36 | - TERM=xterm 37 | volumes: 38 | - ./nginx/www:/usr/share/nginx/html 39 | - ./nginx/localhost.conf:/etc/nginx/conf.d/default.conf 40 | links: 41 | - "php:php83fpm" 42 | ports: 43 | - "81:80" 44 | networks: 45 | - "php83fpm_nginx_network" 46 | 47 | networks: 48 | php83fpm_nginx_network: 49 | driver: bridge 50 | -------------------------------------------------------------------------------- /docker-build/php83fpm-with-nginx/nginx/localhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | listen [::]:80 default_server; 5 | 6 | server_name _; 7 | charset utf-8; 8 | 9 | root /usr/share/nginx/html; 10 | index index.php index.html index.htm; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location ~ [^/]\.php(/|$) { 17 | 18 | try_files $uri =404; 19 | 20 | fastcgi_index /index.php; 21 | fastcgi_pass php83fpm:9000; 22 | fastcgi_read_timeout 1800; 23 | 24 | include fastcgi_params; 25 | 26 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 27 | 28 | if (!-f $document_root$fastcgi_script_name) { 29 | return 404; 30 | } 31 | 32 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 33 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 34 | fastcgi_param PATH_INFO $fastcgi_path_info; 35 | 36 | fastcgi_intercept_errors off; 37 | fastcgi_buffer_size 16k; 38 | fastcgi_buffers 4 16k; 39 | 40 | fastcgi_hide_header X-Powered-By; 41 | 42 | } 43 | 44 | access_log off; 45 | error_log /var/log/nginx/lotto.com-access.error.log; 46 | error_page 401 403 404 /404.html; 47 | 48 | } -------------------------------------------------------------------------------- /docker-build/php83fpm-with-nginx/nginx/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-build/php83fpm-with-wordpres/build/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.3.16-fpm 2 | LABEL maintainer="Eakkabin Jaikeawma " 3 | 4 | RUN set -xe && \ 5 | apt-get update && apt-get install -y curl git gzip libonig-dev libfreetype6-dev libjpeg-dev libmagickwand-dev libpng-dev libzip-dev --no-install-recommends && \ 6 | docker-php-ext-install -j$(nproc) bcmath exif gd mysqli zip mbstring sockets && \ 7 | docker-php-ext-configure gd --with-freetype --with-jpeg && \ 8 | docker-php-ext-configure zip && \ 9 | pecl install imagick && \ 10 | docker-php-ext-enable imagick && \ 11 | ## Download PHP Composer ## 12 | curl -sS https://getcomposer.org/installer | php && chmod +x composer.phar && \ 13 | mv composer.phar /usr/local/bin/composer && \ 14 | # Remove all temp files 15 | apt-get clean && apt autoremove -y && \ 16 | rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* 17 | 18 | WORKDIR /usr/share/nginx/html 19 | EXPOSE 9000 20 | 21 | CMD ["php-fpm"] -------------------------------------------------------------------------------- /docker-build/php83fpm-with-wordpres/conf.d/php83.ini: -------------------------------------------------------------------------------- 1 | # Additional php config 2 | file_uploads = On 3 | 4 | allow_url_fopen = On 5 | allow_url_include = Off 6 | 7 | post_max_size = 64M 8 | 9 | upload_max_filesize = 64M 10 | upload_max_size = 64M 11 | 12 | memory_limit = 128M 13 | 14 | max_file_uploads = 5 15 | max_execution_time = 600 16 | max_input_vars = 1000 17 | max_input_time = 400 18 | 19 | [Date] 20 | date.timezone = Asia/Bangkok 21 | 22 | [Session] 23 | session.name = "SESSID" 24 | session.auto_start = 1 25 | # session.save_handler = "redis" 26 | # session.save_path = "tcp://172.28.0.1:6379?auth=ee14586a07100033ec4a29abb4876735ccab39bf" 27 | -------------------------------------------------------------------------------- /docker-build/php83fpm-with-wordpres/db/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /docker-build/php83fpm-with-wordpres/www/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker-compose/mariadb-example/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install MariaDB v10.3.10 + PhpMyAdmin v4.8.3 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f docker-compose/mariadb-example/docker-compose.yml up -d 36 | ``` 37 | 38 | ``` 39 | http://[IP ADDRESS]:8080 << Demo. PhpMyAdmin v4.8.3 40 | ``` -------------------------------------------------------------------------------- /docker-compose/mariadb-example/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /docker-compose/mariadb-example/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | 5 | mariadb: 6 | image: mariadb:10.3.10 7 | container_name: docker-mariadb 8 | restart: always 9 | environment: 10 | - MYSQL_ROOT_PASSWORD=123456 11 | # - MYSQL_DATABASE=db_admin 12 | # - MYSQL_USER=admin 13 | # - MYSQL_PASSWORD=123456 14 | - VIRTUAL_PORT=3306 15 | - TERM=xterm 16 | volumes: 17 | - ./data:/var/lib/mysql 18 | ports: 19 | - "3306:3306" 20 | networks: 21 | - database_network 22 | 23 | phpmyadmin: 24 | image: phpmyadmin/phpmyadmin:4.8.3 25 | container_name: docker-phpmyadmin 26 | restart: always 27 | environment: 28 | - VIRTUAL_PORT=8080 29 | - PMA_HOST=mariadb 30 | - TERM=xterm 31 | # - PMA_USER=root 32 | # - PMA_PASSWORD=123456 33 | links: 34 | - "mariadb:mariadb" 35 | ports: 36 | - "8080:80" 37 | networks: 38 | - database_network 39 | 40 | networks: 41 | database_network: 42 | ipam: 43 | driver: default 44 | config: 45 | - subnet: 172.29.0.0/24 -------------------------------------------------------------------------------- /docker-compose/mongo-example/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install MongoDB v4.1.3 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f docker-compose/mongo-example/docker-compose.yml up -d 36 | ``` -------------------------------------------------------------------------------- /docker-compose/mongo-example/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /docker-compose/mongo-example/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | 5 | mongo: 6 | image: mongo:4.1.3 7 | container_name: docker-mongo 8 | restart: always 9 | environment: 10 | - VIRTUAL_PORT=27017 11 | - TERM=xterm 12 | - AUTH=no 13 | volumes: 14 | - ./data:/data/db 15 | ports: 16 | - "27017:27017" 17 | networks: 18 | - database_network 19 | # command: mongod --smallfiles 20 | 21 | networks: 22 | database_network: 23 | ipam: 24 | driver: default 25 | config: 26 | - subnet: 172.29.0.0/24 -------------------------------------------------------------------------------- /docker-compose/mysql-example/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install MySQL v5.7.23 + PhpMyAdmin v4.8.3 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f docker-compose/mysql-example/docker-compose.yml up -d 36 | ``` 37 | 38 | ``` 39 | http://[IP ADDRESS]:8080 << Demo. PhpMyAdmin v4.8.3 40 | ``` -------------------------------------------------------------------------------- /docker-compose/mysql-example/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /docker-compose/mysql-example/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | 5 | mysql: 6 | image: mysql:5.7.23 7 | container_name: docker-mysql 8 | restart: always 9 | environment: 10 | - MYSQL_ROOT_PASSWORD=123456 11 | # - MYSQL_DATABASE=db_admin 12 | # - MYSQL_USER=admin 13 | # - MYSQL_PASSWORD=123456 14 | - VIRTUAL_PORT=3306 15 | - TERM=xterm 16 | volumes: 17 | - ./data:/var/lib/mysql 18 | ports: 19 | - "3306:3306" 20 | networks: 21 | - database_network 22 | 23 | phpmyadmin: 24 | image: phpmyadmin/phpmyadmin:4.8.3 25 | container_name: docker-phpmyadmin 26 | restart: always 27 | environment: 28 | - VIRTUAL_PORT=8080 29 | - PMA_HOST=mysql 30 | - TERM=xterm 31 | # - PMA_USER=admin 32 | # - PMA_PASSWORD=123456 33 | links: 34 | - "mysql:mysql" 35 | ports: 36 | - "8080:80" 37 | networks: 38 | - database_network 39 | 40 | networks: 41 | database_network: 42 | ipam: 43 | driver: default 44 | config: 45 | - subnet: 172.29.0.0/24 -------------------------------------------------------------------------------- /docker-compose/nginx-example/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install Nginx v1.15.4-alpine 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f docker-compose/nginx-example/docker-compose.yml up -d 36 | ``` 37 | 38 | ``` 39 | http://[IP ADDRESS] << Demo. Nginx v1.15.4-alpinene 40 | ``` 41 | -------------------------------------------------------------------------------- /docker-compose/nginx-example/conf.d/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80 default_server; 4 | server_name localhost; 5 | 6 | root /usr/share/nginx/html; 7 | index index.html index.htm; 8 | 9 | charset utf-8; 10 | client_max_body_size 128M; 11 | 12 | location / { 13 | try_files $uri $uri/ /; 14 | } 15 | 16 | location = /favicon.ico { 17 | access_log off; 18 | log_not_found off; 19 | } 20 | 21 | access_log off; 22 | error_log /var/log/nginx/localhost.error.log; 23 | # access_log /var/log/nginx/localhost.access.log; 24 | 25 | location ~* \.(js|css|jpg|jpeg|gif|png|svg|ico|pdf|html|htm)$ { 26 | expires 10d; 27 | } 28 | 29 | location ~ /\.ht { 30 | deny all; 31 | return 404; 32 | } 33 | 34 | error_page 401 403 404 /404.html; 35 | 36 | } -------------------------------------------------------------------------------- /docker-compose/nginx-example/conf.d/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes auto; 3 | 4 | error_log /var/log/nginx/error.log warn; 5 | pid /var/run/nginx.pid; 6 | 7 | events { 8 | worker_connections 1024; 9 | } 10 | 11 | http { 12 | 13 | include /etc/nginx/mime.types; 14 | default_type application/octet-stream; 15 | 16 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 17 | '$status $body_bytes_sent "$http_referer" ' 18 | '"$http_user_agent" "$http_x_forwarded_for"'; 19 | 20 | access_log /var/log/nginx/access.log main; 21 | 22 | sendfile on; 23 | #tcp_nopush on; 24 | 25 | keepalive_timeout 65; 26 | 27 | #gzip on; 28 | 29 | include /etc/nginx/conf.d/*.conf; 30 | server_tokens off; 31 | 32 | } -------------------------------------------------------------------------------- /docker-compose/nginx-example/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | 5 | nginx: 6 | image: nginx:1.15.12-alpine 7 | container_name: docker-nginx 8 | working_dir: /usr/share/nginx/html 9 | restart: always 10 | environment: 11 | - VIRTUAL_HOST=localhost 12 | - VIRTUAL_PORT=80 13 | - VIRTUAL_PORT=443 14 | - NGINX_HOST=localhost 15 | - NGINX_PORT=80 16 | - NGINX_PORT=443 17 | - TERM=xterm 18 | volumes: 19 | - ./www:/usr/share/nginx/html 20 | - ./conf.d/nginx.conf:/etc/nginx/nginx.conf 21 | - ./conf.d/default.conf:/etc/nginx/conf.d/default.conf 22 | ports: 23 | - "80:80" 24 | - "443:443" 25 | networks: 26 | - frontend_network 27 | 28 | networks: 29 | frontend_network: 30 | ipam: 31 | driver: default 32 | config: 33 | - subnet: 172.28.0.0/24 34 | -------------------------------------------------------------------------------- /docker-compose/nginx-example/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Welcome to nginx! 5 | 6 | 7 | 8 |

Welcome to nginx!

9 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

10 |

For online documentation and support please refer to 11 | nginx.org.
Commercial support is available at nginx.com.

12 |

Thank you for using nginx.

13 | 14 | -------------------------------------------------------------------------------- /docker-compose/nginx-php7-fpm/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install Nginx v1.15.4-alpine + PHP v7.2.10 (FPM) 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f docker-compose/nginx-php7-fpm/docker-compose.yml up -d 36 | ``` 37 | 38 | ``` 39 | http://[IP ADDRESS] << Demo. Nginx v1.15.4-alpine 40 | 41 | http://[IP ADDRESS]/info.php << Demo. PHP v7.2.10 (FPM) 42 | ``` -------------------------------------------------------------------------------- /docker-compose/nginx-php7-fpm/conf.d/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes auto; 3 | 4 | error_log /var/log/nginx/error.log warn; 5 | pid /var/run/nginx.pid; 6 | 7 | events { 8 | worker_connections 1024; 9 | } 10 | 11 | http { 12 | 13 | include /etc/nginx/mime.types; 14 | default_type application/octet-stream; 15 | 16 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 17 | '$status $body_bytes_sent "$http_referer" ' 18 | '"$http_user_agent" "$http_x_forwarded_for"'; 19 | 20 | access_log /var/log/nginx/access.log main; 21 | 22 | sendfile on; 23 | #tcp_nopush on; 24 | 25 | keepalive_timeout 65; 26 | 27 | #gzip on; 28 | 29 | include /etc/nginx/conf.d/*.conf; 30 | server_tokens off; 31 | 32 | } -------------------------------------------------------------------------------- /docker-compose/nginx-php7-fpm/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | 5 | php7fpm: 6 | image: php:7.2.10-fpm 7 | container_name: docker-php7fpm 8 | working_dir: /usr/share/nginx/html 9 | restart: always 10 | environment: 11 | - VIRTUAL_PORT=9000 12 | - TERM=xterm 13 | volumes: 14 | - ./www:/usr/share/nginx/html 15 | - ./php7-ini/php7.ini:/usr/local/etc/php/php.ini 16 | ports: 17 | - "9000:9000" 18 | networks: 19 | - frontend_network 20 | 21 | nginx: 22 | image: nginx:1.15.4-alpine 23 | container_name: docker-nginx 24 | working_dir: /usr/share/nginx/html 25 | restart: always 26 | environment: 27 | - VIRTUAL_HOST=localhost 28 | - VIRTUAL_PORT=80 29 | - VIRTUAL_PORT=443 30 | - NGINX_HOST=localhost 31 | - NGINX_PORT=80 32 | - NGINX_PORT=443 33 | - TERM=xterm 34 | volumes: 35 | - ./www:/usr/share/nginx/html 36 | - ./conf.d/nginx.conf:/etc/nginx/nginx.conf 37 | - ./conf.d/default.conf:/etc/nginx/conf.d/default.conf 38 | links: 39 | - "php7fpm:phpfpm" 40 | ports: 41 | - "80:80" 42 | - "443:443" 43 | networks: 44 | - frontend_network 45 | 46 | networks: 47 | frontend_network: 48 | ipam: 49 | driver: default 50 | config: 51 | - subnet: 172.28.0.0/24 -------------------------------------------------------------------------------- /docker-compose/nginx-php7-fpm/php7-ini/php7.ini: -------------------------------------------------------------------------------- 1 | # Additional php config 2 | 3 | file_uploads = On 4 | max_file_uploads = 5 5 | allow_url_fopen = On 6 | allow_url_include = Off 7 | 8 | post_max_size = 30M 9 | upload_max_filesize = 30M 10 | 11 | memory_limit = 30M 12 | max_execution_time = 600 13 | 14 | error_reporting = E_ALL 15 | log_errors = 1 16 | 17 | [Date] 18 | date.timezone = Asia/Bangkok 19 | 20 | # session.save_handler = redis 21 | # session.save_path = "tcp://0.0.0.0:6379?auth=ee14586a07100033ec4a29abb4876735ccab39bf" -------------------------------------------------------------------------------- /docker-compose/nginx-php7-fpm/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Welcome to nginx! 5 | 6 | 7 | 8 |

Welcome to nginx!

9 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

10 |

For online documentation and support please refer to 11 | nginx.org.
Commercial support is available at nginx.com.

12 |

Thank you for using nginx.

13 | 14 | 15 | -------------------------------------------------------------------------------- /docker-compose/nginx-php7-fpm/www/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx ()

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docker-compose/nginx-php7-fpm/www/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docker-compose/node-example/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8.9.4-alpine 2 | LABEL Eakkabin Jaikeawma 3 | 4 | RUN mkdir -p /usr/src/app 5 | WORKDIR /usr/src/app 6 | 7 | COPY ./app /usr/src/app/ 8 | RUN npm install --production 9 | 10 | EXPOSE 8000 11 | 12 | CMD [ "npm", "start" ] -------------------------------------------------------------------------------- /docker-compose/node-example/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install Node v8.9.4-alpine 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f docker-compose/node-example/docker-compose.yml up -d 36 | ``` 37 | 38 | ``` 39 | http://[IP ADDRESS]:8000 << Demo. Node.js + Express.js 40 | ``` -------------------------------------------------------------------------------- /docker-compose/node-example/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docker-node-example", 3 | "version": "1.0.0", 4 | "description": "Node.js on Docker", 5 | "author": "Eakkabin Jaikeawma ", 6 | "main": "server.js", 7 | "scripts": { 8 | "start": "node server.js" 9 | }, 10 | "dependencies": { 11 | "express": "^4.16.1" 12 | } 13 | } -------------------------------------------------------------------------------- /docker-compose/node-example/app/server.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const express = require ('express'); 4 | 5 | // Constants 6 | const PORT = 8000; 7 | const HOST = '0.0.0.0'; 8 | 9 | // App 10 | const app = express (); 11 | app.get ('/', function (req, res) { 12 | res.send ('Hello world\n'); 13 | }); 14 | 15 | app.listen(PORT, HOST); 16 | console.log(`Running on http://${HOST}:${PORT}`); 17 | -------------------------------------------------------------------------------- /docker-compose/node-example/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | 5 | node: 6 | build: . 7 | container_name: docker-node 8 | restart: always 9 | environment: 10 | - VIRTUAL_PORT=8000 11 | - TERM=xterm 12 | # volumes: 13 | # - ./app:/usr/src/app 14 | ports: 15 | - "8000:8000" 16 | networks: 17 | - frontend_network 18 | 19 | networks: 20 | frontend_network: 21 | ipam: 22 | driver: default 23 | config: 24 | - subnet: 172.28.0.0/24 -------------------------------------------------------------------------------- /docker-compose/phalcon-php7-fpm/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install Nginx v1.15.4-alpine + PHP v7.2.10 (FPM) + Phalcon v3.4.1 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f docker-compose/phalcon-php7-fpm/docker-compose.yml up -d 36 | ``` 37 | 38 | ``` 39 | http://[IP ADDRESS] << Demo. Nginx v1.15.4-alpine 40 | 41 | http://[IP ADDRESS]/info.php << Demo. PHP v7.2.10 (Info) 42 | ``` -------------------------------------------------------------------------------- /docker-compose/phalcon-php7-fpm/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | 5 | php7fpm: 6 | image: codestep/php7fpm:7.2.10 7 | container_name: docker-php7fpm 8 | restart: always 9 | environment: 10 | - VIRTUAL_PORT=9000 11 | - TERM=xterm 12 | volumes: 13 | - ./www:/usr/share/nginx/html 14 | - ./php7-ini/php7.ini:/usr/local/etc/php/php.ini 15 | ports: 16 | - "9000:9000" 17 | networks: 18 | - frontend_network 19 | 20 | nginx: 21 | image: nginx:1.15.4-alpine 22 | container_name: docker-nginx 23 | restart: always 24 | environment: 25 | - VIRTUAL_HOST=localhost 26 | - VIRTUAL_PORT=80 27 | - VIRTUAL_PORT=443 28 | - NGINX_HOST=localhost 29 | - NGINX_PORT=80 30 | - NGINX_PORT=443 31 | - TERM=xterm 32 | volumes: 33 | - ./www:/usr/share/nginx/html 34 | - ./conf.d/default.conf:/etc/nginx/conf.d/default.conf 35 | links: 36 | - "php7fpm:phpfpm" 37 | ports: 38 | - "80:80" 39 | - "443:443" 40 | networks: 41 | - frontend_network 42 | 43 | networks: 44 | frontend_network: 45 | ipam: 46 | driver: default 47 | config: 48 | - subnet: 172.28.0.0/24 -------------------------------------------------------------------------------- /docker-compose/phalcon-php7-fpm/php7-ini/php7.ini: -------------------------------------------------------------------------------- 1 | # Additional php config 2 | 3 | file_uploads = On 4 | max_file_uploads = 5 5 | allow_url_fopen = On 6 | allow_url_include = Off 7 | 8 | post_max_size = 30M 9 | upload_max_filesize = 30M 10 | 11 | memory_limit = 30M 12 | max_execution_time = 600 13 | 14 | error_reporting = E_ALL 15 | log_errors = 1 16 | 17 | [Date] 18 | date.timezone = Asia/Bangkok 19 | 20 | # session.save_handler = redis 21 | # session.save_path = "tcp://0.0.0.0:6379?auth=ee14586a07100033ec4a29abb4876735ccab39bf" -------------------------------------------------------------------------------- /docker-compose/phalcon-php7-fpm/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Welcome to nginx! 5 | 6 | 7 | 8 |

Welcome to nginx!

9 |

If you see this page, the nginx web server is successfully installed andworking. Further configuration is required.

10 |

For online documentation and support please refer to 11 | nginx.org.
12 | Commercial support is available at 13 | nginx.com.

14 |

Thank you for using nginx.

15 | 16 | -------------------------------------------------------------------------------- /docker-compose/phalcon-php7-fpm/www/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx ()

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docker-compose/phalcon-php7-fpm/www/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docker-compose/php7-example/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | 32 | Install PHP v7.2.10 (FPM) 33 | --------------------------------------------------- 34 | 35 | ``` 36 | sudo docker-compose -f docker-compose/php7-example/docker-compose.yml up -d 37 | ``` -------------------------------------------------------------------------------- /docker-compose/php7-example/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | 5 | php7fpm: 6 | image: php:7.2.10-fpm 7 | container_name: docker-php7fpm 8 | working_dir: /usr/share/nginx/html 9 | restart: always 10 | environment: 11 | - VIRTUAL_PORT=9000 12 | - TERM=xterm 13 | volumes: 14 | - ./php7-ini/php7.ini:/usr/local/etc/php/php.ini 15 | ports: 16 | - "9000:9000" 17 | networks: 18 | - frontend_network 19 | 20 | networks: 21 | frontend_network: 22 | ipam: 23 | driver: default 24 | config: 25 | - subnet: 172.28.0.0/24 -------------------------------------------------------------------------------- /docker-compose/php7-example/php7-ini/php7.ini: -------------------------------------------------------------------------------- 1 | # Additional php config 2 | 3 | file_uploads = On 4 | max_file_uploads = 5 5 | allow_url_fopen = On 6 | allow_url_include = Off 7 | 8 | post_max_size = 30M 9 | upload_max_filesize = 30M 10 | 11 | memory_limit = 30M 12 | max_execution_time = 600 13 | 14 | error_reporting = E_ALL 15 | log_errors = 1 16 | 17 | [Date] 18 | date.timezone = Asia/Bangkok 19 | 20 | # session.save_handler = redis 21 | # session.save_path = "tcp://0.0.0.0:6379?auth=ee14586a07100033ec4a29abb4876735ccab39bf" -------------------------------------------------------------------------------- /docker-compose/redis-example/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install Redis Database v4.0.11-alpine 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f docker-compose/redis-example/docker-compose.yml up -d 36 | ``` -------------------------------------------------------------------------------- /docker-compose/redis-example/conf.d/redis.conf: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docker-compose/redis-example/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /docker-compose/redis-example/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | 5 | redis: 6 | image: redis:4.0.11-alpine 7 | container_name: docker-redis 8 | restart: always 9 | environment: 10 | - VIRTUAL_PORT=6379 11 | - TERM=xterm 12 | volumes: 13 | - ./data:/data 14 | - ./conf.d/redis.conf:/usr/local/etc/redis/redis.conf 15 | ports: 16 | - "6379:6379" 17 | networks: 18 | - database_network 19 | 20 | networks: 21 | frontend_network: 22 | ipam: 23 | driver: default 24 | config: 25 | - subnet: 172.28.0.0/24 -------------------------------------------------------------------------------- /docker-files/php74-ext/mongodb-1.17.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-files/php74-ext/mongodb-1.17.0.so -------------------------------------------------------------------------------- /docker-files/php74-ext/phalcon-5.3.1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-files/php74-ext/phalcon-5.3.1.so -------------------------------------------------------------------------------- /docker-files/php74-ext/psr-1.2.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-files/php74-ext/psr-1.2.0.so -------------------------------------------------------------------------------- /docker-files/php74-ini/mongodb-1.17.0.ini: -------------------------------------------------------------------------------- 1 | extension=mongodb.so 2 | -------------------------------------------------------------------------------- /docker-files/php74-ini/phalcon-5.3.1.ini: -------------------------------------------------------------------------------- 1 | extension=phalcon.so 2 | -------------------------------------------------------------------------------- /docker-files/php74-ini/psr-1.2.0.ini: -------------------------------------------------------------------------------- 1 | extension=psr.so 2 | -------------------------------------------------------------------------------- /docker-files/php80-ext/mongodb-1.17.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-files/php80-ext/mongodb-1.17.0.so -------------------------------------------------------------------------------- /docker-files/php80-ext/phalcon-5.3.1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-files/php80-ext/phalcon-5.3.1.so -------------------------------------------------------------------------------- /docker-files/php80-ext/psr-1.2.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-files/php80-ext/psr-1.2.0.so -------------------------------------------------------------------------------- /docker-files/php80-ini/mongodb-1.17.0.ini: -------------------------------------------------------------------------------- 1 | extension=mongodb.so 2 | -------------------------------------------------------------------------------- /docker-files/php80-ini/phalcon-5.3.1.ini: -------------------------------------------------------------------------------- 1 | extension=phalcon.so 2 | -------------------------------------------------------------------------------- /docker-files/php80-ini/psr-1.2.0.ini: -------------------------------------------------------------------------------- 1 | extension=psr.so 2 | -------------------------------------------------------------------------------- /docker-files/php81-ext/mongodb-1.17.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-files/php81-ext/mongodb-1.17.0.so -------------------------------------------------------------------------------- /docker-files/php81-ext/phalcon-5.3.1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-files/php81-ext/phalcon-5.3.1.so -------------------------------------------------------------------------------- /docker-files/php81-ext/psr-1.2.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-files/php81-ext/psr-1.2.0.so -------------------------------------------------------------------------------- /docker-files/php81-ini/mongodb-1.17.0.ini: -------------------------------------------------------------------------------- 1 | extension=mongodb.so 2 | -------------------------------------------------------------------------------- /docker-files/php81-ini/phalcon-5.3.1.ini: -------------------------------------------------------------------------------- 1 | extension=phalcon.so 2 | -------------------------------------------------------------------------------- /docker-files/php81-ini/psr-1.2.0.ini: -------------------------------------------------------------------------------- 1 | extension=psr.so 2 | -------------------------------------------------------------------------------- /docker-files/php82-ext/php82-mongodb-1.17.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-files/php82-ext/php82-mongodb-1.17.0.so -------------------------------------------------------------------------------- /docker-files/php82-ext/php82-phalcon-5.3.1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-files/php82-ext/php82-phalcon-5.3.1.so -------------------------------------------------------------------------------- /docker-files/php82-ext/psr-1.2.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-files/php82-ext/psr-1.2.0.so -------------------------------------------------------------------------------- /docker-files/php82-ini/php82-mongodb-1.17.0.ini: -------------------------------------------------------------------------------- 1 | extension=mongodb.so 2 | -------------------------------------------------------------------------------- /docker-files/php82-ini/php82-phalcon-5.3.1.ini: -------------------------------------------------------------------------------- 1 | extension=phalcon.so 2 | -------------------------------------------------------------------------------- /docker-files/php82-ini/psr-1.2.0.ini: -------------------------------------------------------------------------------- 1 | extension=psr.so 2 | -------------------------------------------------------------------------------- /docker-install/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y && sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 8 | 9 | cd /build/docker-awesome 10 | ``` 11 | 12 | 13 | Install Docker Engine CE v20.10.7 (Free Version) 14 | --------------------------------------------------- 15 | 16 | ``` 17 | bash /build/docker-awesome/docker-install/install-docker-engine-on-ubuntu20.sh 18 | ``` 19 | 20 | 21 | Install Docker Compose v1.29.2 22 | --------------------------------------------------- 23 | 24 | ``` 25 | bash /build/docker-awesome/docker-install/install-docker-compose-on-ubuntu20.sh 26 | ``` 27 | 28 | 29 | Install CTOP Monitor Containers 30 | --------------------------------------------------- 31 | 32 | ``` 33 | bash /build/docker-awesome/docker-install/install-ctop-monitor.sh 34 | ``` 35 | -------------------------------------------------------------------------------- /docker-install/install-ctop-monitor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo apt-get install python-pip -y 3 | sudo pip install ctop -y 4 | sudo wget https://github.com/bcicen/ctop/releases/download/v0.4/ctop-0.4-linux-amd64 -O ctop 5 | sudo mv ctop /usr/local/bin/ 6 | sudo chmod +x /usr/local/bin/ctop 7 | sudo ctop -------------------------------------------------------------------------------- /docker-install/install-docker-compose-on-gce.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | docker run docker/compose:1.19.0-rc1 version 3 | echo alias docker-compose="'"'docker run -v /var/run/docker.sock:/var/run/docker.sock -v "$PWD:/rootfs/$PWD" -w="/rootfs/$PWD" docker/compose:1.19.0-rc1'"'" >> ~/.bashrc 4 | source ~/.bashrc -------------------------------------------------------------------------------- /docker-install/install-docker-compose-on-ubuntu18.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 4 | sudo chmod +x /usr/local/bin/docker-compose 5 | 6 | sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose 7 | sudo docker-compose --version 8 | -------------------------------------------------------------------------------- /docker-install/install-docker-compose-on-ubuntu20.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 4 | sudo chmod +x /usr/local/bin/docker-compose 5 | sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose 6 | sudo docker-compose --version 7 | 8 | # mkdir -p ~/.docker/cli-plugins/ 9 | # sudo curl -SL "https://github.com/docker/compose/releases/download/v2.1.1/docker-compose-linux-$(uname -m)" -o ~/.docker/cli-plugins/docker-compose 10 | # sudo chmod +x ~/.docker/cli-plugins/docker-compose 11 | # docker compose version 12 | -------------------------------------------------------------------------------- /docker-install/install-docker-compose-on-ubuntu22.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 4 | sudo chmod +x /usr/local/bin/docker-compose 5 | sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose 6 | sudo docker-compose --version 7 | 8 | # mkdir -p ~/.docker/cli-plugins/ 9 | # sudo curl -SL "https://github.com/docker/compose/releases/download/v2.1.1/docker-compose-linux-$(uname -m)" -o ~/.docker/cli-plugins/docker-compose 10 | # sudo chmod +x ~/.docker/cli-plugins/docker-compose 11 | # docker compose version 12 | -------------------------------------------------------------------------------- /docker-install/install-docker-engine-on-gcp-with-debian9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo apt-get update && sudo apt-get upgrade -y 3 | sudo apt-get remove docker docker-engine docker.io -y 4 | sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y 5 | sudo curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add - 6 | sudo apt-get update && sudo apt-cache policy docker-ce 7 | sudo apt-get install -y docker 8 | sudo groupadd docker 9 | sudo usermod -aG docker $(whoami) -------------------------------------------------------------------------------- /docker-install/install-docker-engine-on-ubuntu18.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common 3 | sudo apt-get remove -y docker docker-engine docker-ce docker.io 4 | sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 5 | sudo apt-key fingerprint 0EBFCD88 6 | sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 7 | sudo apt-get update && sudo apt-cache policy docker-ce 8 | sudo apt-get install -y docker-ce 9 | sudo apt-cache madison docker-ce 10 | sudo groupadd docker 11 | sudo usermod -aG docker $(whoami) 12 | sudo service docker start 13 | sudo systemctl status docker 14 | sudo docker info -------------------------------------------------------------------------------- /docker-install/install-docker-engine-on-ubuntu20.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt-get update 4 | sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common 5 | 6 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 7 | 8 | sudo apt-key fingerprint 0EBFCD88 9 | sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 10 | 11 | sudo apt-get update 12 | 13 | sudo apt-get install docker-ce docker-ce-cli containerd.io -y 14 | apt-cache madison docker-ce 15 | 16 | sudo apt-get install docker-ce=5:19.03.9~3-0~ubuntu-focal docker-ce-cli=5:19.03.9~3-0~ubuntu-focal containerd.io -y 17 | docker --version 18 | 19 | sudo systemctl enable --now docker 20 | sudo usermod -aG docker $(whoami) 21 | 22 | sudo docker info 23 | -------------------------------------------------------------------------------- /docker-install/install-docker-engine-on-ubuntu22.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt-get update 4 | sudo apt-get install ca-certificates curl gnupg -y 5 | 6 | sudo install -m 0755 -d /etc/apt/keyrings 7 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg 8 | sudo chmod a+r /etc/apt/keyrings/docker.gpg 9 | 10 | echo \ 11 | "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ 12 | "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ 13 | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null 14 | 15 | sudo apt-get update 16 | sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y 17 | 18 | docker --version 19 | 20 | sudo systemctl enable --now docker 21 | sudo usermod -aG docker $(whoami) 22 | 23 | sudo docker info 24 | -------------------------------------------------------------------------------- /docker-install/install-docker-engine-on-ubuntu24.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt-get update 4 | sudo apt-get install ca-certificates curl gnupg -y 5 | 6 | sudo install -m 0755 -d /etc/apt/keyrings 7 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg 8 | sudo chmod a+r /etc/apt/keyrings/docker.gpg 9 | 10 | echo \ 11 | "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ 12 | "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ 13 | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null 14 | 15 | sudo apt-get update 16 | sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y 17 | 18 | docker --version 19 | 20 | sudo systemctl enable --now docker 21 | sudo usermod -aG docker $(whoami) 22 | 23 | sudo docker info 24 | -------------------------------------------------------------------------------- /docker-install/install-nginx-on-ubuntu22.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt update -y && sudo apt upgrade -y 4 | sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -y 5 | 6 | curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null 7 | gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg 8 | 9 | # Nginx 10 | echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list 11 | echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx 12 | 13 | # Update 14 | sudo apt update -y 15 | sudo apt install nginx -y 16 | 17 | # Check Versiob 18 | nginx -v # nginx version: nginx/1.24.0 19 | 20 | # Remove & Clear 21 | sudo apt autoremove -y 22 | 23 | # Enable 24 | sudo nginx 25 | sudo systemctl enable nginx && sudo systemctl status nginx 26 | 27 | # Check 28 | curl -I 127.0.0.1 29 | -------------------------------------------------------------------------------- /docker-install/install-nginx-on-ubuntu24.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt update -y && sudo apt upgrade -y 4 | sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -y 5 | 6 | curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null 7 | gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg 8 | 9 | # Nginx 10 | echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list 11 | echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx 12 | 13 | # Remove Apache2 14 | sudo service apache2 stop 15 | sudo apt-get purge apache2 apache2-utils apache2-bin apache2.2-common 16 | sudo rm -rf /etc/apache2 17 | sudo apt autoremove -y 18 | 19 | # Update 20 | sudo apt update -y 21 | sudo apt install nginx -y 22 | 23 | # Check Versiob 24 | nginx -v # nginx version: nginx/1.26.1 25 | 26 | # Remove & Clear 27 | sudo apt autoremove -y 28 | 29 | # Enable 30 | sudo nginx 31 | sudo systemctl enable nginx && sudo systemctl status nginx 32 | 33 | # Check 34 | curl -I 127.0.0.1 -------------------------------------------------------------------------------- /docker-install/install-nodejs-16-on-ubuntu20.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Node.js 16.19.1 4 | curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh 5 | 6 | bash nodesource_setup.sh 7 | apt-get install nodejs -y 8 | 9 | rm -rf nodesource_setup.sh 10 | 11 | sudo apt autoremove -y 12 | node -v 13 | -------------------------------------------------------------------------------- /docker-install/install-nodejs-16-on-ubuntu22.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Node.js 16.19.1 4 | sudo apt-get update -y 5 | sudo apt-get install -y ca-certificates curl gnupg 6 | 7 | sudo apt-get purge nodejs 8 | sudo apt autoremove -y 9 | 10 | sudo mkdir -p /etc/apt/keyrings 11 | curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg 12 | 13 | NODE_MAJOR=20 14 | echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list 15 | 16 | sudo apt-get update -y 17 | sudo apt-get install nodejs -y 18 | sudo apt autoremove -y 19 | 20 | node -v 21 | -------------------------------------------------------------------------------- /docker-install/install-nodejs-18-on-ubuntu22.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Node.js 18.18.0 4 | sudo apt-get update -y 5 | sudo apt-get install -y ca-certificates curl gnupg 6 | 7 | sudo apt-get purge nodejs 8 | sudo apt autoremove -y 9 | 10 | sudo mkdir -p /etc/apt/keyrings 11 | curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg 12 | 13 | NODE_MAJOR=18 14 | echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list 15 | 16 | sudo apt-get update -y 17 | sudo apt-get install nodejs -y 18 | sudo apt autoremove -y 19 | 20 | node -v 21 | -------------------------------------------------------------------------------- /docker-install/install-nodejs-18-on-ubuntu24.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Node.js 18.20.3 4 | sudo apt-get update -y 5 | sudo apt-get install -y ca-certificates curl gnupg 6 | 7 | sudo apt-get purge nodejs 8 | sudo apt autoremove -y 9 | 10 | sudo mkdir -p /etc/apt/keyrings 11 | curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg 12 | 13 | NODE_MAJOR=18 14 | echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list 15 | 16 | sudo apt-get update -y 17 | sudo apt-get install nodejs -y 18 | sudo apt autoremove -y 19 | 20 | npm install -g npm 21 | 22 | node -v # v18.20.3 23 | npm -v # v10.8.2 -------------------------------------------------------------------------------- /docker-install/install-nodejs-20-on-ubuntu22.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Node.js 20.12.2 4 | sudo apt-get update -y 5 | sudo apt-get install -y ca-certificates curl gnupg 6 | 7 | sudo apt-get purge nodejs 8 | sudo apt autoremove -y 9 | 10 | sudo mkdir -p /etc/apt/keyrings 11 | curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg 12 | 13 | NODE_MAJOR=20 14 | echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list 15 | 16 | sudo apt-get update -y 17 | sudo apt-get install nodejs -y 18 | sudo apt autoremove -y 19 | 20 | node -v 21 | -------------------------------------------------------------------------------- /docker-install/install-nodejs-20-on-ubuntu24.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Node.js 20.14.0 4 | sudo apt-get update -y 5 | sudo apt-get install -y ca-certificates curl gnupg 6 | 7 | sudo apt-get purge nodejs 8 | sudo apt autoremove -y 9 | 10 | sudo mkdir -p /etc/apt/keyrings 11 | curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg 12 | 13 | NODE_MAJOR=20 14 | echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list 15 | 16 | sudo apt-get update -y 17 | sudo apt-get install nodejs -y 18 | sudo apt autoremove -y 19 | 20 | npm install -g npm 21 | 22 | node -v # v20.14.0 23 | npm -v # v10.8.2 -------------------------------------------------------------------------------- /docker-install/install-nodejs-22-on-ubuntu24.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Node.js 20.14.0 4 | sudo apt-get update -y 5 | sudo apt-get install -y ca-certificates curl gnupg 6 | 7 | sudo apt-get purge nodejs 8 | sudo apt autoremove -y 9 | 10 | sudo mkdir -p /etc/apt/keyrings 11 | curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg 12 | 13 | NODE_MAJOR=22 14 | echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list 15 | 16 | sudo apt-get update -y 17 | sudo apt-get install nodejs -y 18 | sudo apt autoremove -y 19 | 20 | npm install -g npm 21 | 22 | node -v # v22.13.1 23 | npm -v # v11.0.0 24 | -------------------------------------------------------------------------------- /docker-install/install-php74-fpm-and-composer-on-ubuntu22.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt update -y && sudo apt upgrade -y 4 | sudo apt install software-properties-common -y 5 | 6 | sudo add-apt-repository ppa:ondrej/php -y 7 | 8 | # PHP 7.4.33 (cli) 9 | sudo apt install php7.4-fpm -y 10 | php -v # PHP 7.4.33 (cli) (built: Feb 14 2023 18:31:54) ( NTS ) 11 | 12 | # Composer version 2.5.5 13 | curl -sS https://getcomposer.org/installer | php 14 | chmod +x composer.phar 15 | 16 | mv composer.phar /usr/local/bin/composer 17 | composer -V # Composer version 2.5.5 2023-03-21 11:50:05 18 | -------------------------------------------------------------------------------- /docker-install/install-php74-fpm-and-composer-on-ubuntu24.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt update -y && sudo apt upgrade -y 4 | sudo apt install software-properties-common -y 5 | 6 | sudo add-apt-repository ppa:ondrej/php -y 7 | 8 | # PHP 7.4.33 (cli) 9 | sudo apt install php7.4-fpm -y 10 | php -v # PHP 7.4.33 (cli) (built: Feb 14 2023 18:31:54) ( NTS ) 11 | 12 | # Composer version 2.5.5 13 | curl -sS https://getcomposer.org/installer | php 14 | chmod +x composer.phar 15 | 16 | mv composer.phar /usr/local/bin/composer 17 | composer -V # Composer version 2.8.6 2025-02-25 13:03:50 18 | -------------------------------------------------------------------------------- /docker-install/install-php80-fpm-and-composer-on-ubuntu20.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # PHP 8.0.26 (FPM) 4 | sudo apt install software-properties-common 5 | sudo add-apt-repository ppa:ondrej/php 6 | 7 | sudo apt update 8 | sudo apt install php8.0-fpm -y 9 | sudo apt autoremove -y 10 | 11 | sudo systemctl status php8.0-fpm 12 | php -v 13 | 14 | # Composer version 2.5.5 15 | curl -sS https://getcomposer.org/installer | php 16 | chmod +x composer.phar 17 | 18 | mv composer.phar /usr/local/bin/composer 19 | composer -V 20 | -------------------------------------------------------------------------------- /docker-install/install-php81-fpm-and-composer-on-ubuntu20.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # PHP 8.1.17 (FPM) 4 | sudo apt install software-properties-common 5 | sudo add-apt-repository ppa:ondrej/php 6 | 7 | sudo apt update 8 | sudo apt install php8.1-fpm -y 9 | sudo apt autoremove -y 10 | 11 | sudo systemctl status php8.1-fpm 12 | php -v 13 | 14 | # Composer version 2.5.5 15 | curl -sS https://getcomposer.org/installer | php 16 | chmod +x composer.phar 17 | 18 | mv composer.phar /usr/local/bin/composer 19 | composer -V 20 | -------------------------------------------------------------------------------- /docker-install/install-php81-fpm-and-composer-on-ubuntu22.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt update -y && sudo apt upgrade -y 4 | sudo apt install software-properties-common -y 5 | 6 | sudo add-apt-repository ppa:ondrej/php -y 7 | 8 | # PHP 8.1.21 (cli) 9 | sudo apt install php8.1 -y 10 | php -v # PHP 8.1.21 (cli) (built: Jul 8 2023 07:10:19) (NTS) 11 | 12 | # Composer version 2.6.2 13 | curl -sS https://getcomposer.org/installer | php 14 | chmod +x composer.phar 15 | 16 | mv composer.phar /usr/local/bin/composer 17 | composer -V # Composer version 2.6.2 2023-09-03 14:09:15 18 | -------------------------------------------------------------------------------- /docker-install/install-php81-fpm-and-composer-on-ubuntu24.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt update -y && sudo apt upgrade -y 4 | sudo apt install software-properties-common -y 5 | 6 | sudo add-apt-repository ppa:ondrej/php -y 7 | 8 | # PHP 8.1.31 (cli) 9 | sudo apt install php8.1 php8.1-fpm php8.1-mysql php8.1-redis php8.1-mongodb php8.1-zip php8.1-gd -y 10 | php -v # PHP 8.1.31 (cli) (built: Nov 21 2024 13:10:45) (NTS) 11 | 12 | # Composer version 2.8.5 13 | curl -sS https://getcomposer.org/installer | php 14 | chmod +x composer.phar 15 | 16 | mv composer.phar /usr/local/bin/composer 17 | composer -V # Composer version 2.8.5 2025-01-21 15:23:40 18 | -------------------------------------------------------------------------------- /docker-install/install-php82-fpm-and-composer-on-ubuntu22.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt update -y && sudo apt upgrade -y 4 | sudo apt install software-properties-common -y 5 | 6 | sudo add-apt-repository ppa:ondrej/php -y 7 | 8 | # PHP 8.2.10 (cli) 9 | sudo apt install php8.2 -y 10 | php -v # PHP 8.2.10 (cli) (built: Sep 2 2023 06:59:22) (NTS) 11 | 12 | # Composer version 2.6.2 13 | curl -sS https://getcomposer.org/installer | php 14 | chmod +x composer.phar 15 | 16 | mv composer.phar /usr/local/bin/composer 17 | composer -V # Composer version 2.6.2 2023-09-03 14:09:15 18 | -------------------------------------------------------------------------------- /docker-install/install-php83-fpm-and-composer-on-ubuntu22.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt update -y && sudo apt upgrade -y 4 | sudo apt install software-properties-common -y 5 | 6 | sudo add-apt-repository ppa:ondrej/php -y 7 | 8 | # PHP 8.3.6 (cli) 9 | sudo apt install php8.3 -y 10 | php -v # PHP 8.3.6 (cli) (built: Apr 11 2024 20:23:38) (NTS) 11 | 12 | # Composer version 2.7.2 13 | curl -sS https://getcomposer.org/installer | php 14 | chmod +x composer.phar 15 | 16 | mv composer.phar /usr/local/bin/composer 17 | composer -V # Composer version 2.7.2 2024-03-11 17:12:18 18 | -------------------------------------------------------------------------------- /docker-install/install-php83-fpm-and-composer-on-ubuntu24.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt update -y && sudo apt upgrade -y 4 | sudo apt install software-properties-common -y 5 | 6 | sudo add-apt-repository ppa:ondrej/php -y 7 | 8 | # PHP 8.3.9 (cli) 9 | sudo apt install php8.3 php8.3-fpm php8.3-mysql php8.3-redis php8.3-mongodb php8.3-zip php8.3-gd -y 10 | php -v # PHP 8.3.9 (cli) (built: Jul 5 2024 12:04:09) (NTS) 11 | 12 | # Composer version 2.7.7 13 | curl -sS https://getcomposer.org/installer | php 14 | chmod +x composer.phar 15 | 16 | mv composer.phar /usr/local/bin/composer 17 | composer -V # Composer version 2.7.7 2024-06-10 22:11:12 -------------------------------------------------------------------------------- /docker-install/install-php84-fpm-and-composer-on-ubuntu24.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt update -y && sudo apt upgrade -y 4 | sudo apt install software-properties-common -y 5 | 6 | sudo add-apt-repository ppa:ondrej/php -y 7 | 8 | # PHP 8.4.5 (cli) 9 | sudo apt install php8.4 php8.4-fpm php8.4-mysql php8.4-redis php8.4-mongodb php8.4-zip php8.4-gd -y 10 | php -v # PHP 8.4.5 (cli) (built: Mar 13 2025 15:36:20) (NTS) 11 | 12 | # Composer version 2.8.6 13 | curl -sS https://getcomposer.org/installer | php 14 | chmod +x composer.phar 15 | 16 | mv composer.phar /usr/local/bin/composer 17 | composer -V # Composer version 2.8.6 2025-02-25 13:03:50 18 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /docker-php/php7-laravel5/php7-ini/php7.ini: -------------------------------------------------------------------------------- 1 | # Additional php config 2 | 3 | cgi.fix_pathinfo=0 4 | 5 | file_uploads = On 6 | max_file_uploads = 5 7 | allow_url_fopen = On 8 | allow_url_include = Off 9 | 10 | post_max_size = 30M 11 | upload_max_filesize = 30M 12 | 13 | memory_limit = 30M 14 | max_execution_time = 600 15 | 16 | error_reporting = E_ALL 17 | log_errors = 1 18 | 19 | [Date] 20 | date.timezone = Asia/Bangkok 21 | 22 | # session.save_handler = redis 23 | # session.save_path = "tcp://0.0.0.0:6379?auth=ee14586a07100033ec4a29abb4876735ccab39bf" -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx ()

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.yml] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/.env: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | 9 | DB_CONNECTION=mysql 10 | DB_HOST=127.0.0.1 11 | DB_PORT=3306 12 | DB_DATABASE=homestead 13 | DB_USERNAME=homestead 14 | DB_PASSWORD=secret 15 | 16 | BROADCAST_DRIVER=log 17 | CACHE_DRIVER=file 18 | QUEUE_CONNECTION=sync 19 | SESSION_DRIVER=file 20 | SESSION_LIFETIME=120 21 | 22 | REDIS_HOST=127.0.0.1 23 | REDIS_PASSWORD=null 24 | REDIS_PORT=6379 25 | 26 | MAIL_DRIVER=smtp 27 | MAIL_HOST=smtp.mailtrap.io 28 | MAIL_PORT=2525 29 | MAIL_USERNAME=null 30 | MAIL_PASSWORD=null 31 | MAIL_ENCRYPTION=null 32 | 33 | PUSHER_APP_ID= 34 | PUSHER_APP_KEY= 35 | PUSHER_APP_SECRET= 36 | PUSHER_APP_CLUSTER=mt1 37 | 38 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 39 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 40 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | 9 | DB_CONNECTION=mysql 10 | DB_HOST=127.0.0.1 11 | DB_PORT=3306 12 | DB_DATABASE=homestead 13 | DB_USERNAME=homestead 14 | DB_PASSWORD=secret 15 | 16 | BROADCAST_DRIVER=log 17 | CACHE_DRIVER=file 18 | QUEUE_CONNECTION=sync 19 | SESSION_DRIVER=file 20 | SESSION_LIFETIME=120 21 | 22 | REDIS_HOST=127.0.0.1 23 | REDIS_PASSWORD=null 24 | REDIS_PORT=6379 25 | 26 | MAIL_DRIVER=smtp 27 | MAIL_HOST=smtp.mailtrap.io 28 | MAIL_PORT=2525 29 | MAIL_USERNAME=null 30 | MAIL_PASSWORD=null 31 | MAIL_ENCRYPTION=null 32 | 33 | PUSHER_APP_ID= 34 | PUSHER_APP_KEY= 35 | PUSHER_APP_SECRET= 36 | PUSHER_APP_CLUSTER=mt1 37 | 38 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 39 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 40 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | 31 | /** 32 | * Register the commands for the application. 33 | * 34 | * @return void 35 | */ 36 | protected function commands() 37 | { 38 | $this->load(__DIR__.'/Commands'); 39 | 40 | require base_path('routes/console.php'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/app/Http/Controllers/Auth/VerificationController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | $this->middleware('signed')->only('verify'); 40 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/home'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | parent::boot(); 31 | 32 | // 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/app/User.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => env('SES_REGION', 'us-east-1'), 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker $faker) { 17 | return [ 18 | 'name' => $faker->name, 19 | 'email' => $faker->unique()->safeEmail, 20 | 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret 21 | 'remember_token' => str_random(10), 22 | ]; 23 | }); 24 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->timestamp('email_verified_at')->nullable(); 21 | $table->string('password'); 22 | $table->rememberToken(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('users'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Welcome to nginx! 5 | 6 | 7 | 8 |

Welcome to nginx!

9 |

If you see this page, the nginx web server is successfully installed andworking. Further configuration is required.

10 |

For online documentation and support please refer to 11 | nginx.org.
12 | Commercial support is available at 13 | nginx.com.

14 |

Thank you for using nginx.

15 | 16 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Unit 14 | 15 | 16 | 17 | ./tests/Feature 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Handle Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drivesoft-technology/docker-awesome/51c5f58a4ba264b331a66850dc07321c8a0b91bd/docker-php/php7-laravel5/www/laravelapp/public/favicon.ico -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/resources/js/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * First we will load all of this project's JavaScript dependencies which 4 | * includes Vue and other libraries. It is a great starting point when 5 | * building robust, powerful web applications using Vue and Laravel. 6 | */ 7 | 8 | require('./bootstrap'); 9 | 10 | window.Vue = require('vue'); 11 | 12 | /** 13 | * Next, we will create a fresh Vue application instance and attach it to 14 | * the page. Then, you may begin adding components to this application 15 | * or customize the JavaScript scaffolding to fit your unique needs. 16 | */ 17 | 18 | Vue.component('example-component', require('./components/ExampleComponent.vue')); 19 | 20 | const app = new Vue({ 21 | el: '#app' 22 | }); 23 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/resources/js/components/ExampleComponent.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | 2 | // Body 3 | $body-bg: #f8fafc; 4 | 5 | // Typography 6 | $font-family-sans-serif: "Nunito", sans-serif; 7 | $font-size-base: 0.9rem; 8 | $line-height-base: 1.6; 9 | 10 | // Colors 11 | $blue: #3490dc; 12 | $indigo: #6574cd; 13 | $purple: #9561e2; 14 | $pink: #f66D9b; 15 | $red: #e3342f; 16 | $orange: #f6993f; 17 | $yellow: #ffed4a; 18 | $green: #38c172; 19 | $teal: #4dc0b5; 20 | $cyan: #6cb2eb; 21 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | // Fonts 3 | @import url('https://fonts.googleapis.com/css?family=Nunito'); 4 | 5 | // Variables 6 | @import 'variables'; 7 | 8 | // Bootstrap 9 | @import '~bootstrap/scss/bootstrap'; 10 | 11 | .navbar-laravel { 12 | background-color: #fff; 13 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04); 14 | } 15 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/routes/web.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /docker-php/php7-laravel5/www/laravelapp/webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .sass('resources/sass/app.scss', 'public/css'); 16 | -------------------------------------------------------------------------------- /docker-php/php7-phalcon3/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install LEMP Stack (Linux-Nginx-MariaDB-Php7) 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f docker-phpframework/php7-phalcon3/docker-compose.yml up -d 36 | ``` 37 | 38 | 39 | Install Phalcon Framework 3 40 | --------------------------------------------------- 41 | 42 | ``` 43 | docker exec -it docker-php7fpm sh 44 | 45 | cd phalconapp && composer install 46 | ``` 47 | 48 | ``` 49 | http://[IP ADDRESS] << Demo. Nginx v1.15.4-alpine 50 | 51 | http://[IP ADDRESS]/info.php << Demo. PHP v7.2.10 (Info) 52 | 53 | http://[IP ADDRESS]:8080 << Demo. PhpMyAdmin v4.8.3 54 | ``` -------------------------------------------------------------------------------- /docker-php/php7-phalcon3/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /docker-php/php7-phalcon3/php7-ini/php7.ini: -------------------------------------------------------------------------------- 1 | # Additional php config 2 | 3 | file_uploads = On 4 | max_file_uploads = 5 5 | allow_url_fopen = On 6 | allow_url_include = Off 7 | 8 | post_max_size = 30M 9 | upload_max_filesize = 30M 10 | 11 | memory_limit = 30M 12 | max_execution_time = 600 13 | 14 | error_reporting = E_ALL 15 | log_errors = 1 16 | 17 | [Date] 18 | date.timezone = Asia/Bangkok 19 | 20 | # session.save_handler = redis 21 | # session.save_path = "tcp://0.0.0.0:6379?auth=ee14586a07100033ec4a29abb4876735ccab39bf" -------------------------------------------------------------------------------- /docker-php/php7-phalcon3/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Welcome to nginx! 5 | 6 | 7 | 8 |

Welcome to nginx!

9 |

If you see this page, the nginx web server is successfully installed andworking. Further configuration is required.

10 |

For online documentation and support please refer to 11 | nginx.org.
12 | Commercial support is available at 13 | nginx.com.

14 |

Thank you for using nginx.

15 | 16 | -------------------------------------------------------------------------------- /docker-php/php7-phalcon3/www/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx ()

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docker-php/php7-phalcon3/www/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docker-php/php7-yii3/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install LEMP Stack (Linux-Nginx-MariaDB-Php7) 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f docker-phpframework/php7-yii3/docker-compose.yml up -d 36 | ``` 37 | 38 | 39 | Install Yii Framework 3 40 | --------------------------------------------------- 41 | 42 | ``` 43 | docker exec -it docker-php7fpm sh 44 | 45 | cd yiiapp && composer install 46 | ``` 47 | 48 | ``` 49 | http://[IP ADDRESS] << Demo. Nginx v1.15.4-alpine 50 | 51 | http://[IP ADDRESS]/info.php << Demo. PHP v7.2.10 (Info) 52 | 53 | http://[IP ADDRESS]:8080 << Demo. PhpMyAdmin v4.8.3 54 | ``` -------------------------------------------------------------------------------- /docker-php/php7-yii3/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /docker-php/php7-yii3/php7-ini/php7.ini: -------------------------------------------------------------------------------- 1 | # Additional php config 2 | 3 | file_uploads = On 4 | max_file_uploads = 5 5 | allow_url_fopen = On 6 | allow_url_include = Off 7 | 8 | post_max_size = 30M 9 | upload_max_filesize = 30M 10 | 11 | memory_limit = 30M 12 | max_execution_time = 600 13 | 14 | error_reporting = E_ALL 15 | log_errors = 1 16 | 17 | [Date] 18 | date.timezone = Asia/Bangkok 19 | 20 | # session.save_handler = redis 21 | # session.save_path = "tcp://0.0.0.0:6379?auth=ee14586a07100033ec4a29abb4876735ccab39bf" -------------------------------------------------------------------------------- /docker-php/php7-yii3/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Welcome to nginx! 5 | 6 | 7 | 8 |

Welcome to nginx!

9 |

If you see this page, the nginx web server is successfully installed andworking. Further configuration is required.

10 |

For online documentation and support please refer to 11 | nginx.org.
12 | Commercial support is available at 13 | nginx.com.

14 |

Thank you for using nginx.

15 | 16 | -------------------------------------------------------------------------------- /docker-php/php7-yii3/www/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx ()

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docker-php/php7-yii3/www/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /package-version.txt: -------------------------------------------------------------------------------- 1 | - Docker Engine CE: v27.1.2 2 | - Docker Compose: v2.29.1 3 | - Nginx: v1.27.1-alpine 4 | - PHP: v8.3.10-fpm 5 | - Node: v22.7.0-alpine 6 | - MySQL: v8.4.2 7 | - MariaDB: v11.4.3 8 | - PhpMyAdmin: v5.2.1 9 | - MongoDB: v7.0.14 10 | - Redis Database: v7.2.5-alpine 11 | - Phalcon Framework: v5.7.0 12 | - MongoDB PHP Module: v1.18.1 13 | - PHP Composer: v2.7.8 -------------------------------------------------------------------------------- /project-demo/lemp-stack/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install LEMP Stack (Linux-Nginx-MariaDB-Php7) 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f project-demo/lemp-stack/docker-compose.yml up -d 36 | ``` 37 | 38 | ``` 39 | http://[IP ADDRESS] << Demo. Nginx v1.15.4-alpine 40 | 41 | http://[IP ADDRESS]/info.php << Demo. PHP v7.2.10 (Info) 42 | 43 | http://[IP ADDRESS]:8080 << Demo. PhpMyAdmin v4.8.3 44 | ``` 45 | -------------------------------------------------------------------------------- /project-demo/lemp-stack/build/php7fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.2.10-fpm 2 | LABEL Eakkabin Jaikeawma 3 | 4 | RUN apt-get update && apt-get install -y curl libpcre3-dev libssl-dev --no-install-recommends \ 5 | && docker-php-ext-install -j$(nproc) iconv mysqli pdo pdo_mysql mbstring \ 6 | && apt-get clean && apt-get autoremove \ 7 | && rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* 8 | 9 | WORKDIR /usr/share/nginx/html 10 | EXPOSE 9000 11 | 12 | CMD ["php-fpm"] 13 | -------------------------------------------------------------------------------- /project-demo/lemp-stack/conf.d/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes auto; 3 | 4 | error_log /var/log/nginx/error.log warn; 5 | pid /var/run/nginx.pid; 6 | 7 | events { 8 | worker_connections 1024; 9 | } 10 | 11 | http { 12 | 13 | include /etc/nginx/mime.types; 14 | default_type application/octet-stream; 15 | 16 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 17 | '$status $body_bytes_sent "$http_referer" ' 18 | '"$http_user_agent" "$http_x_forwarded_for"'; 19 | 20 | access_log /var/log/nginx/access.log main; 21 | 22 | sendfile on; 23 | #tcp_nopush on; 24 | 25 | keepalive_timeout 65; 26 | 27 | #gzip on; 28 | 29 | include /etc/nginx/conf.d/*.conf; 30 | include /etc/nginx/conf.d/vhosts/*.conf; 31 | 32 | server_tokens off; 33 | 34 | } -------------------------------------------------------------------------------- /project-demo/lemp-stack/database/mysql/backup/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /project-demo/lemp-stack/database/mysql/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /project-demo/lemp-stack/php7-ini/php7.ini: -------------------------------------------------------------------------------- 1 | # Additional php config 2 | 3 | file_uploads = On 4 | max_file_uploads = 5 5 | allow_url_fopen = On 6 | allow_url_include = Off 7 | 8 | post_max_size = 30M 9 | upload_max_filesize = 30M 10 | 11 | memory_limit = 30M 12 | max_execution_time = 600 13 | 14 | error_reporting = E_ALL 15 | log_errors = 1 16 | 17 | [Date] 18 | date.timezone = Asia/Bangkok 19 | -------------------------------------------------------------------------------- /project-demo/lemp-stack/vhosts/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /project-demo/lemp-stack/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx!

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/lemp-stack/www/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx!

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/lemp-stack/www/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project-demo/load-balancing-layer-4/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /project-demo/load-balancing-layer-4/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install Layer 4 Load Balancing (Load + Server + DB) 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f project-demo/load-balancing-layer-4/docker-compose.yml up -d 36 | ``` 37 | 38 | ``` 39 | http://[IP ADDRESS] << Demo. Nginx v1.15.4-alpine 40 | 41 | http://[IP ADDRESS]:8000 << Demo. HAProxy Status v1.8.2-alpine 42 | 43 | http://[IP ADDRESS]/info.php << Demo. PHP v7.2.10 (FPM) 44 | ``` 45 | -------------------------------------------------------------------------------- /project-demo/load-balancing-layer-4/build/php7fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.2.10-fpm 2 | LABEL Eakkabin Jaikeawma 3 | 4 | RUN apt-get update && apt-get install -y --no-install-recommends \ 5 | && docker-php-ext-install -j$(nproc) iconv mysqli pdo pdo_mysql mbstring \ 6 | && apt-get clean && apt-get autoremove \ 7 | && rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* 8 | 9 | WORKDIR /usr/share/nginx/html 10 | EXPOSE 9000 11 | 12 | CMD ["php-fpm"] -------------------------------------------------------------------------------- /project-demo/load-balancing-layer-4/conf.d/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes auto; 3 | 4 | error_log /var/log/nginx/error.log warn; 5 | pid /var/run/nginx.pid; 6 | 7 | events { 8 | worker_connections 1024; 9 | } 10 | 11 | http { 12 | 13 | include /etc/nginx/mime.types; 14 | default_type application/octet-stream; 15 | 16 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 17 | '$status $body_bytes_sent "$http_referer" ' 18 | '"$http_user_agent" "$http_x_forwarded_for"'; 19 | 20 | access_log /var/log/nginx/access.log main; 21 | 22 | sendfile on; 23 | #tcp_nopush on; 24 | 25 | keepalive_timeout 65; 26 | 27 | #gzip on; 28 | 29 | include /etc/nginx/conf.d/*.conf; 30 | 31 | server_tokens off; 32 | 33 | } -------------------------------------------------------------------------------- /project-demo/load-balancing-layer-4/conf.d/php7.ini: -------------------------------------------------------------------------------- 1 | # Additional php config 2 | 3 | file_uploads = On 4 | max_file_uploads = 5 5 | allow_url_fopen = On 6 | allow_url_include = Off 7 | 8 | post_max_size = 30M 9 | upload_max_filesize = 30M 10 | 11 | memory_limit = 30M 12 | max_execution_time = 600 13 | 14 | error_reporting = E_ALL 15 | log_errors = 1 16 | 17 | [Date] 18 | date.timezone = Asia/Bangkok 19 | 20 | # session.save_handler = redis 21 | # session.save_path = "tcp://0.0.0.0:6379?auth=ee14586a07100033ec4a29abb4876735ccab39bf" -------------------------------------------------------------------------------- /project-demo/load-balancing-layer-4/www/check.txt: -------------------------------------------------------------------------------- 1 | Web Server (Check.txt) 2 | -------------------------------------------------------------------------------- /project-demo/load-balancing-layer-4/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx!

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/load-balancing-layer-4/www/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx!

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/load-balancing-layer-4/www/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project-demo/multi-domain/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /project-demo/multi-domain/README.md: -------------------------------------------------------------------------------- 1 | Getting started for Docker Engine CE (Free Version) 2 | --------------------------------------------------- 3 | 4 | ``` 5 | sudo mkdir -p /build && cd /build 6 | 7 | sudo apt-get install git -y 8 | 9 | sudo git clone https://github.com/drivesoft-technology/docker-awesome.git 10 | 11 | cd /build/docker-awesome 12 | ``` 13 | 14 | 15 | Install Docker Engine CE v18.06.1 (Free Version) 16 | --------------------------------------------------- 17 | 18 | ``` 19 | bash docker-install/install-docker-engine-on-ubuntu18.sh 20 | ``` 21 | 22 | 23 | Install Docker Compose v1.22.0 24 | --------------------------------------------------- 25 | 26 | ``` 27 | bash docker-install/install-docker-compose-on-ubuntu18.sh 28 | ``` 29 | 30 | 31 | Install Multi Domain (Linux-Nginx-MariaDB-Php7) 32 | --------------------------------------------------- 33 | 34 | ``` 35 | sudo docker-compose -f project-demo/multi-domain/docker-compose.yml up -d 36 | ``` 37 | 38 | ``` 39 | http://[IP ADDRESS] << Demo. Nginx v1.15.4-alpine 40 | 41 | http://[IP ADDRESS]/info.php << Demo. PHP v7.2.10 (FPM) 42 | 43 | http://[IP ADDRESS]:8080 << Demo. PhpMyAdmin v4.8.3 44 | ``` 45 | -------------------------------------------------------------------------------- /project-demo/multi-domain/balance/conf.d/demo.com.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80; 4 | server_name localhost demo.com; 5 | 6 | charset utf-8; 7 | client_max_body_size 128M; 8 | 9 | location / { 10 | proxy_pass http://0.0.0.0:8000; 11 | } 12 | 13 | location /site1/ { 14 | proxy_pass http://0.0.0.0:8001; 15 | } 16 | 17 | location /site2/ { 18 | proxy_pass http://0.0.0.0:8002; 19 | } 20 | 21 | location /site3/ { 22 | proxy_pass http://0.0.0.0:8003; 23 | } 24 | 25 | location = /favicon.ico { 26 | access_log off; 27 | log_not_found off; 28 | } 29 | 30 | access_log off; 31 | error_log /var/log/nginx/localhost.error.log; 32 | # access_log /var/log/nginx/localhost.access.log; 33 | 34 | location ~* \.(js|css|jpg|jpeg|gif|png|svg|ico|pdf|html|htm)$ { 35 | expires 10d; 36 | } 37 | 38 | location ~ /\.ht { 39 | deny all; 40 | return 404; 41 | } 42 | 43 | error_page 401 403 404 /404.html; 44 | 45 | } -------------------------------------------------------------------------------- /project-demo/multi-domain/balance/conf.d/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes auto; 3 | 4 | error_log /var/log/nginx/error.log warn; 5 | pid /var/run/nginx.pid; 6 | 7 | events { 8 | worker_connections 1024; 9 | } 10 | 11 | http { 12 | 13 | include /etc/nginx/mime.types; 14 | default_type application/octet-stream; 15 | 16 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 17 | '$status $body_bytes_sent "$http_referer" ' 18 | '"$http_user_agent" "$http_x_forwarded_for"'; 19 | 20 | access_log /var/log/nginx/access.log main; 21 | 22 | sendfile on; 23 | #tcp_nopush on; 24 | 25 | keepalive_timeout 65; 26 | 27 | #gzip on; 28 | 29 | include /etc/nginx/conf.d/*.conf; 30 | include /etc/nginx/conf.d/vhosts/*.conf; 31 | 32 | } -------------------------------------------------------------------------------- /project-demo/multi-domain/balance/vhosts/main.demo.com.conf: -------------------------------------------------------------------------------- 1 | 2 | upstream main { 3 | least_conn; 4 | server 172.28.0.1:8000 weight=2; 5 | } 6 | 7 | server { 8 | 9 | allow 127.0.0.1; 10 | allow 172.19.0.1; 11 | allow 172.28.0.1; 12 | allow 172.29.0.1; 13 | deny all; 14 | 15 | listen 8000; 16 | server_name localhost; 17 | 18 | charset utf-8; 19 | client_max_body_size 128M; 20 | 21 | location / { 22 | proxy_pass http://main; 23 | } 24 | 25 | location = /favicon.ico { 26 | access_log off; 27 | log_not_found off; 28 | } 29 | 30 | access_log off; 31 | error_log /var/log/nginx/localhost.error.log; 32 | # access_log /var/log/nginx/localhost.access.log; 33 | 34 | location ~* \.(js|css|jpg|jpeg|gif|png|svg|ico|pdf|html|htm)$ { 35 | expires 10d; 36 | } 37 | 38 | location ~ /\.ht { 39 | deny all; 40 | return 404; 41 | } 42 | 43 | error_page 401 403 404 /404.html; 44 | 45 | } -------------------------------------------------------------------------------- /project-demo/multi-domain/balance/vhosts/site1.demo.com.conf: -------------------------------------------------------------------------------- 1 | 2 | upstream site1 { 3 | least_conn; 4 | server 172.28.0.1:8001 weight=2; 5 | } 6 | 7 | server { 8 | 9 | allow 127.0.0.1; 10 | allow 172.19.0.1; 11 | allow 172.28.0.1; 12 | allow 172.29.0.1; 13 | deny all; 14 | 15 | listen 8001; 16 | server_name localhost; 17 | 18 | charset utf-8; 19 | client_max_body_size 128M; 20 | 21 | location / { 22 | proxy_pass http://site1; 23 | } 24 | 25 | location = /favicon.ico { 26 | access_log off; 27 | log_not_found off; 28 | } 29 | 30 | access_log off; 31 | error_log /var/log/nginx/localhost.error.log; 32 | # access_log /var/log/nginx/localhost.access.log; 33 | 34 | location ~* \.(js|css|jpg|jpeg|gif|png|svg|ico|pdf|html|htm)$ { 35 | expires 10d; 36 | } 37 | 38 | location ~ /\.ht { 39 | deny all; 40 | return 404; 41 | } 42 | 43 | error_page 401 403 404 /404.html; 44 | 45 | } -------------------------------------------------------------------------------- /project-demo/multi-domain/balance/vhosts/site2.demo.com.conf: -------------------------------------------------------------------------------- 1 | 2 | upstream site2 { 3 | least_conn; 4 | server 172.28.0.1:8002 weight=2; 5 | } 6 | 7 | server { 8 | 9 | allow 127.0.0.1; 10 | allow 172.19.0.1; 11 | allow 172.28.0.1; 12 | allow 172.29.0.1; 13 | deny all; 14 | 15 | listen 8002; 16 | server_name localhost; 17 | 18 | charset utf-8; 19 | client_max_body_size 128M; 20 | 21 | location / { 22 | proxy_pass http://site2; 23 | } 24 | 25 | location = /favicon.ico { 26 | access_log off; 27 | log_not_found off; 28 | } 29 | 30 | access_log off; 31 | error_log /var/log/nginx/localhost.error.log; 32 | # access_log /var/log/nginx/localhost.access.log; 33 | 34 | location ~* \.(js|css|jpg|jpeg|gif|png|svg|ico|pdf|html|htm)$ { 35 | expires 10d; 36 | } 37 | 38 | location ~ /\.ht { 39 | deny all; 40 | return 404; 41 | } 42 | 43 | error_page 401 403 404 /404.html; 44 | 45 | } -------------------------------------------------------------------------------- /project-demo/multi-domain/balance/vhosts/site3.demo.com.conf: -------------------------------------------------------------------------------- 1 | 2 | upstream site3 { 3 | least_conn; 4 | server 172.28.0.1:8003 weight=2; 5 | } 6 | 7 | server { 8 | 9 | allow 127.0.0.1; 10 | allow 172.19.0.1; 11 | allow 172.28.0.1; 12 | allow 172.29.0.1; 13 | deny all; 14 | 15 | listen 8003; 16 | server_name localhost; 17 | 18 | charset utf-8; 19 | client_max_body_size 128M; 20 | 21 | location / { 22 | proxy_pass http://site3; 23 | } 24 | 25 | location = /favicon.ico { 26 | access_log off; 27 | log_not_found off; 28 | } 29 | 30 | access_log off; 31 | error_log /var/log/nginx/localhost.error.log; 32 | # access_log /var/log/nginx/localhost.access.log; 33 | 34 | location ~* \.(js|css|jpg|jpeg|gif|png|svg|ico|pdf|html|htm)$ { 35 | expires 10d; 36 | } 37 | 38 | location ~ /\.ht { 39 | deny all; 40 | return 404; 41 | } 42 | 43 | error_page 401 403 404 /404.html; 44 | 45 | } -------------------------------------------------------------------------------- /project-demo/multi-domain/database/mariadb/backup/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /project-demo/multi-domain/database/mariadb/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /project-demo/multi-domain/database/mongodb/backup/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /project-demo/multi-domain/database/mongodb/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /project-demo/multi-domain/database/mongodb/mongod.conf: -------------------------------------------------------------------------------- 1 | # mongod.conf 2 | 3 | # for documentation of all options, see: 4 | # http://docs.mongodb.org/manual/reference/configuration-options/ 5 | 6 | # Where and how to store data. 7 | storage: 8 | dbPath: /data/db 9 | journal: 10 | enabled: true 11 | # engine: 12 | # mmapv1: 13 | # wiredTiger: 14 | 15 | # where to write logging data. 16 | systemLog: 17 | destination: file 18 | logAppend: true 19 | path: /var/log/mongodb/mongod.log 20 | 21 | # network interfaces 22 | net: 23 | port: 27017 24 | bindIp: 127.0.0.1 25 | 26 | # how the process runs 27 | processManagement: 28 | timeZoneInfo: /usr/share/zoneinfo 29 | 30 | #security: 31 | 32 | #operationProfiling: 33 | 34 | #replication: 35 | 36 | #sharding: 37 | 38 | ## Enterprise-Only Options: 39 | 40 | #auditLog: 41 | 42 | #snmp: 43 | -------------------------------------------------------------------------------- /project-demo/multi-domain/main.demo.com/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx!

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/multi-domain/main.demo.com/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to demo.com ()

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/multi-domain/main.demo.com/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project-demo/multi-domain/site1.demo.com/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx!

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/multi-domain/site1.demo.com/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to site1.demo.com ()

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/multi-domain/site1.demo.com/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project-demo/multi-domain/site2.demo.com/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx!

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/multi-domain/site2.demo.com/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to site2.demo.com ()

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/multi-domain/site2.demo.com/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project-demo/multi-domain/site3.demo.com/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx!

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/multi-domain/site3.demo.com/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to site3.demo.com ()

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/multi-domain/site3.demo.com/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project-demo/multi-domain/webserver/build/php7fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.2.10-fpm 2 | LABEL Eakkabin Jaikeawma 3 | 4 | RUN apt-get update && apt-get install -y curl libpcre3-dev libssl-dev libssl1.0.0 --no-install-recommends \ 5 | && docker-php-ext-install -j$(nproc) iconv mysqli pdo pdo_mysql mbstring \ 6 | && apt-get clean && apt-get autoremove \ 7 | && rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* 8 | 9 | WORKDIR /usr/share/nginx/html 10 | EXPOSE 9000 11 | 12 | CMD ["php-fpm"] -------------------------------------------------------------------------------- /project-demo/multi-domain/webserver/conf.d/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes auto; 3 | 4 | error_log /var/log/nginx/error.log warn; 5 | pid /var/run/nginx.pid; 6 | 7 | events { 8 | worker_connections 1024; 9 | } 10 | 11 | http { 12 | 13 | include /etc/nginx/mime.types; 14 | default_type application/octet-stream; 15 | 16 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 17 | '$status $body_bytes_sent "$http_referer" ' 18 | '"$http_user_agent" "$http_x_forwarded_for"'; 19 | 20 | access_log /var/log/nginx/access.log main; 21 | 22 | sendfile on; 23 | #tcp_nopush on; 24 | 25 | keepalive_timeout 65; 26 | 27 | #gzip on; 28 | 29 | include /etc/nginx/conf.d/*.conf; 30 | 31 | } -------------------------------------------------------------------------------- /project-demo/multi-domain/webserver/php7-conf/php7fpm1.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | daemonize = no 3 | 4 | [www] 5 | listen = [::]:9000 -------------------------------------------------------------------------------- /project-demo/multi-domain/webserver/php7-conf/php7fpm2.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | daemonize = no 3 | 4 | [www] 5 | listen = [::]:9000 -------------------------------------------------------------------------------- /project-demo/multi-domain/webserver/php7-ini/php7.ini: -------------------------------------------------------------------------------- 1 | # Additional php config 2 | 3 | file_uploads = On 4 | max_file_uploads = 5 5 | allow_url_fopen = On 6 | allow_url_include = Off 7 | 8 | post_max_size = 30M 9 | upload_max_filesize = 30M 10 | 11 | memory_limit = 30M 12 | max_execution_time = 600 13 | 14 | error_reporting = E_ALL 15 | log_errors = 1 16 | 17 | [Date] 18 | date.timezone = Asia/Bangkok 19 | 20 | # session.save_handler = redis 21 | # session.save_path = "tcp://0.0.0.0:6379?auth=ee14586a07100033ec4a29abb4876735ccab39bf" -------------------------------------------------------------------------------- /project-demo/multi-domain/webserver/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx!

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/multi-domain/webserver/www/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Welcome to nginx! 7 | 8 | 9 | 10 |

Welcome to nginx ()

11 |

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

12 |

For online documentation and support please refer to nginx.org .
Commercial support is available at nginx.com .

13 |

Thank you for using nginx.

14 | 15 | 16 | -------------------------------------------------------------------------------- /project-demo/multi-domain/webserver/www/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project-demo/node-mongo-api/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules -------------------------------------------------------------------------------- /project-demo/node-mongo-api/app/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8.9.4 2 | LABEL Eakkabin Jaikeawma 3 | 4 | # Create app directory 5 | WORKDIR /usr/src/app 6 | 7 | # Install app dependencies 8 | # A wildcard is used to ensure both package.json AND package-lock.json are copied 9 | # where available (npm@5+) 10 | COPY package*.json ./ 11 | 12 | RUN npm install nodemon express --only=production 13 | # RUN npm install --only=production 14 | 15 | # Bundle app source 16 | COPY . . 17 | 18 | EXPOSE 8000 19 | 20 | CMD [ "npm", "start" ] -------------------------------------------------------------------------------- /project-demo/node-mongo-api/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-mongo-api", 3 | "version": "1.0.0", 4 | "author": "Eakkabin Jaikeawma ", 5 | "scripts": { 6 | "start": "nodemon server.js" 7 | }, 8 | "dependencies": { 9 | "async": "2.6.0", 10 | "body-parser": "1.20.3", 11 | "cookie-parser": "1.4.3", 12 | "fs": "0.0.2", 13 | "jsonwebtoken": "8.1.1", 14 | "mongoose": "6.13.6", 15 | "morgan": "1.9.1", 16 | "promise": "8.0.1" 17 | }, 18 | "devDependencies": { 19 | "express": "^4.16.2", 20 | "nodemon": "^1.15.0" 21 | }, 22 | "engineStrict": true, 23 | "engines": { 24 | "node": ">= 8.9", 25 | "npm": ">= 5.6" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /project-demo/node-mongo-api/app/schema/auth.js: -------------------------------------------------------------------------------- 1 | 2 | var mongoose = require('mongoose'); 3 | var Schema = mongoose.Schema; 4 | 5 | var AuthSchema = new Schema({ 6 | email : { type: String, required: true, unique: true }, 7 | admin : { type: Number, default: 0 } 8 | }, { collection : 'col_auth' }); 9 | 10 | module.exports = mongoose.model('Auth', AuthSchema); -------------------------------------------------------------------------------- /project-demo/node-mongo-api/app/schema/user.js: -------------------------------------------------------------------------------- 1 | 2 | var mongoose = require('mongoose'); 3 | var Schema = mongoose.Schema; 4 | 5 | var UserSchema = new Schema({ 6 | username : { type: String, required: true, unique: true }, 7 | password : { type: String, required: true }, 8 | email : { type: String, required: true }, 9 | firstname : { type: String, default: '' }, 10 | lastname : { type: String, default: '' }, 11 | status : { type: String, default: 'A' } 12 | }, { collection : 'col_user' }); 13 | 14 | module.exports = mongoose.model('User', UserSchema); -------------------------------------------------------------------------------- /project-demo/node-mongo-api/app/setting/database.js: -------------------------------------------------------------------------------- 1 | 2 | /* ====================================================================== 3 | * Config Database - RESTful API 4 | * ====================================================================== */ 5 | 6 | var service = require ('./service'); 7 | 8 | /* ====================================================================== 9 | * Export 10 | * ====================================================================== */ 11 | 12 | module.exports = { 13 | 14 | /* MongoDB 3.4 */ 15 | 'mongodb': 'mongodb://' + service.db_host + ': ' + service.db_port + '/' + service.db_name 16 | 17 | }; -------------------------------------------------------------------------------- /project-demo/node-mongo-api/app/setting/service.js: -------------------------------------------------------------------------------- 1 | 2 | /* ====================================================================== 3 | * Config RESTful API 4 | * ====================================================================== */ 5 | 6 | module.exports = { 7 | 8 | /* api service */ 9 | 'db_address' : '0.0.0.0', 10 | 'port' : 8000, 11 | 12 | /* db service */ 13 | 'db_host' : '0.0.0.0', 14 | 'db_port' : 27017, 15 | 'db_user' : 'root', 16 | 'db_pass' : '123456', 17 | 'db_name' : 'db_node_api', 18 | 19 | /* url */ 20 | 'apiUrl' : 'http://0.0.0.0:8000', 21 | 'secret' : 'node-mongo-api', 22 | 'expires' : (1440 * 1) // expires in 24 hours (1440:24 hours) 23 | 24 | }; -------------------------------------------------------------------------------- /project-demo/node-mongo-api/app/v1.0/routers/users.js: -------------------------------------------------------------------------------- 1 | 2 | /* ====================================================================== 3 | * Import Node Package 4 | * ====================================================================== */ 5 | 6 | var express = require('express'); 7 | var router = express.Router(); 8 | 9 | /* ====================================================================== 10 | * Schema 11 | * ====================================================================== */ 12 | 13 | var User = require('./../../schema/user'); 14 | 15 | /* ====================================================================== 16 | * Router 17 | * ====================================================================== */ 18 | 19 | // GET: http://localhost:7000/v1.0/users 20 | router.get ('', function (req, res) { 21 | User.find().exec().then(function(responseUsers) { 22 | if (responseUsers) { 23 | res.json ({ status: 200, success: true, message: 'OK', items: responseUsers }); 24 | } else { 25 | res.json({ status: 400, message: 'BAD REQUEST' }); 26 | } 27 | }).catch(function(err) { res.json({ status: 400, message: 'BAD REQUEST' }); }); 28 | }); 29 | 30 | module.exports = router; -------------------------------------------------------------------------------- /project-demo/node-mongo-api/deploy/backup/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /project-demo/node-mongo-api/deploy/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /project-demo/node-mongo-api/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | 5 | mongodb: 6 | image: mongo:4.1.3 7 | container_name: docker-mongodb 8 | restart: always 9 | environment: 10 | - VIRTUAL_PORT=27017 11 | - TERM=xterm 12 | - AUTH=no 13 | volumes: 14 | - ./deploy/data:/data/db 15 | - ./deploy/backup:/backup 16 | ports: 17 | - "27017:27017" 18 | networks: 19 | - frontend_network 20 | # command: mongod --smallfiles 21 | 22 | node: 23 | build: ./test 24 | container_name: docker-node 25 | restart: always 26 | environment: 27 | - VIRTUAL_PORT=8000 28 | - TERM=xterm 29 | volumes: 30 | - ./app:/usr/src/app 31 | links: 32 | - "mongodb:mongo" 33 | ports: 34 | - "8000:8000" 35 | - "8001:8001" 36 | networks: 37 | - frontend_network 38 | 39 | networks: 40 | frontend_network: -------------------------------------------------------------------------------- /project-demo/wordpress-stack/build/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.3-fpm-alpine 2 | 3 | RUN apk upgrade --update && apk --no-cache add \ 4 | autoconf file g++ gcc binutils isl libatomic libc-dev musl-dev make re2c libstdc++ libgcc libcurl curl-dev binutils-libs mpc1 mpfr3 gmp libgomp coreutils freetype-dev libjpeg-turbo-dev libltdl libmcrypt-dev libpng-dev openssl-dev libxml2-dev expat-dev \ 5 | && docker-php-ext-install -j$(nproc) iconv mysqli pdo pdo_mysql curl bcmath mcrypt mbstring json xml zip opcache \ 6 | && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ 7 | && docker-php-ext-install -j$(nproc) gd 8 | 9 | CMD ["php-fpm"] -------------------------------------------------------------------------------- /project-demo/wordpress-stack/conf.d/php7.ini: -------------------------------------------------------------------------------- 1 | # Additional php config 2 | 3 | cgi.fix_pathinfo = 0 4 | 5 | file_uploads = On 6 | max_file_uploads = 5 7 | allow_url_fopen = On 8 | allow_url_include = Off 9 | 10 | post_max_size = 30M 11 | upload_max_filesize = 30M 12 | 13 | memory_limit = 30M 14 | max_execution_time = 600 15 | 16 | cgi.fix_pathinfo = 0 17 | 18 | # error_reporting = E_ALL 19 | # log_errors = 1 20 | 21 | [Date] 22 | date.timezone = Asia/Bangkok 23 | 24 | [Session] 25 | session.name = "SESSID" 26 | session.auto_start = 1 27 | # session.save_handler = "redis" 28 | # session.save_path = "tcp://172.28.0.1:6379?auth=ee14586a07100033ec4a29abb4876735ccab39bf" -------------------------------------------------------------------------------- /project-demo/wordpress-stack/database/backup/mongo/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /project-demo/wordpress-stack/database/backup/sql/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /project-demo/wordpress-stack/database/mongo/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /project-demo/wordpress-stack/database/sql/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /project-demo/wordpress-stack/www/index.html: -------------------------------------------------------------------------------- 1 |

Mod-Rewrite is not enabled

Please enable rewrite module on your web server to continue -------------------------------------------------------------------------------- /ubuntu-install/ubuntu-18.04-install-node-8.x.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #----------------------------------------------------------# 4 | # Variables # 5 | #----------------------------------------------------------# 6 | 7 | echo -e "\n===== Welcome to Shell Files ========================\n" 8 | 9 | # Am I root? 10 | if [ "x$(id -u)" != 'x0' ]; then 11 | echo 'Error: this script can only be executed by root' 12 | exit 1 13 | fi 14 | 15 | #----------------------------------------------------------# 16 | # Install packages # 17 | #----------------------------------------------------------# 18 | 19 | # Let's start 20 | echo -e "\nDowloading ..." 21 | echo -e "======================================================\n" 22 | cd ~ 23 | curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - 24 | 25 | echo -e "\nInstall ..." 26 | echo -e "======================================================\n" 27 | sudo apt-get install nodejs build-essential -y 28 | 29 | echo -e "\nShow info" 30 | echo -e "======================================================\n" 31 | sudo node -v 32 | 33 | #----------------------------------------------------------# 34 | # Goodbye # 35 | #----------------------------------------------------------# 36 | 37 | echo -e "\n===== Goodbye ========================================" 38 | -------------------------------------------------------------------------------- /ubuntu-install/ubuntu-18.04-install-node-9.x.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #----------------------------------------------------------# 4 | # Variables # 5 | #----------------------------------------------------------# 6 | 7 | echo -e "\n===== Welcome to Shell Files ========================\n" 8 | 9 | # Am I root? 10 | if [ "x$(id -u)" != 'x0' ]; then 11 | echo 'Error: this script can only be executed by root' 12 | exit 1 13 | fi 14 | 15 | #----------------------------------------------------------# 16 | # Install packages # 17 | #----------------------------------------------------------# 18 | 19 | # Let's start 20 | echo -e "\nDowloading ..." 21 | echo -e "======================================================\n" 22 | cd ~ 23 | curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - 24 | 25 | echo -e "\nInstall ..." 26 | echo -e "======================================================\n" 27 | sudo apt-get install nodejs build-essential -y 28 | 29 | echo -e "\nShow info" 30 | echo -e "======================================================\n" 31 | sudo node -v 32 | 33 | #----------------------------------------------------------# 34 | # Goodbye # 35 | #----------------------------------------------------------# 36 | 37 | echo -e "\n===== Goodbye ========================================" 38 | --------------------------------------------------------------------------------