Giter VIP home page Giter VIP logo

nginx-php-fpm's Introduction

Ngnix & PHP-fpm

Docker 설치하기

wget -qO- https://get.docker.com/ | sh

이미지 받기

docker pull gyuha/nginx-php-fpm

환경변수 설정 하기

NGINX_SERVER_NAME="sample.com"
NGINX_ROOT_PATH="/opt/wwwroot"
NGINX_APP_PATH=${NGINX_ROOT_PATH}"/application/public"
NGINX_SSL_PATH="/opt/ssl"
NGINX_SSL_CERTIFICATE="ssl-unified.crt"
NGINX_SSL_CERTIFICATE_KEY="ssl.key"

실행하기

docker \
  run \
  --detach \
  --env NGINX_SERVER_NAME=${NGINX_SERVER_NAME} \
  --volume ${NGINX_ROOT_PATH}:/opt/wwwroot \
  --env NGINX_APP_PATH=${NGINX_APP_PATH} \
  --name nginx-php-fpm \
  --publish 80:80 \
  --publish 433:433 \
  --restart=always \
  gyuha/nginx-php-fpm;

SSL 지정하기

docker \
  run \
  --detach \
  --env NGINX_SERVER_NAME=${NGINX_SERVER_NAME} \
  --volume ${NGINX_ROOT_PATH}:/opt/wwwroot \
  --env NGINX_APP_PATH=${NGINX_APP_PATH} \
  --volume ${NGINX_SSL_PATH}:/etc/nginx/ssl \
  --env NGINX_SSL_CERTIFICATE=${NGINX_SSL_CERTIFICATE} \
  --env NGINX_SSL_CERTIFICATE_KEY=${NGINX_SSL_CERTIFICATE_KEY} \
  --name nginx-php-fpm \
  --publish 80:80 \
  --publish 433:433 \
  --restart=always \
  gyuha/nginx-php-fpm;

Docker build

docker build -t nginx-php-fpm .

without cache

docker build -t nginx-php-fpm --no-cache .

실행중인 이미지의 쉘 실행하기

docker exec -i -t [container-id] /bin/bash

nginx-php-fpm's People

Contributors

gyuha avatar

Stargazers

Fil avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.