Giter VIP home page Giter VIP logo

php-fpm-nginx's Introduction

What is it?

Another PHP 7.2 (fpm) + nginx boilerplate docker image based on Alpine Linux 3.6.

How to use it?

Via docker run:

docker run -p 80:80 bartoszmaciaszek/php-fpm-nginx:latest

With docker-compose:

just use the following snippet in your docker-compose.yml file:

  my_service:
    image: bartoszmaciaszek/php-fpm-nginx:latest
    ports:
      - 80:80

Visit http://localhost/ to see your phpinfo() page.

How do I run my own app on top of this?

By default, the code (index.php with phpinfo()) is located in working directory: /var/www/html. Of course you can change the location and override web server vhost configuration to suit your needs.

First, mount your code, to, let's say /app. You can do it with docker run -v parameter or in your docker-compose.yml like this:

    volumes:
      - .:/app

It is a good idea to change the working directory as well docker run -w or via your docker-compose.yml:

    working_dir: /app

Then supply your vhost configuration as a volume

    volumes:
      ...
      - ./my-vhost.conf:/etc/nginx/sites-enabled/default.conf:ro

Once your container is up and running, you can visit http://localhost to see you app.

php-fpm-nginx's People

Contributors

bartosz-maciaszek avatar

Stargazers

Dawid Góra avatar

Watchers

James Cloos avatar  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.