Coder Social home page Coder Social logo

luizjr / docker-laravel-postgres-nginx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thayronarrais/docker-laravel-postgres-nginx

0.0 1.0 0.0 11 KB

Simple docker-compose for Laravel, with postgresql, reddis, nginx, php-fpm

PHP 3.54% Dockerfile 96.46%

docker-laravel-postgres-nginx's Introduction

docker-laravel-postgres-nginx

Simple docker-compose for Laravel, with postgresql, reddis, nginx and php-fpm

Pre-requisites

  • Docker running on the host machine.
  • Docker compose running on the host machine.
  • Basic knowledge of Docker.

Installation

  • To get started, the following steps needs to be taken:
  • Clone the repo.
  • cd laravel-docker-postgres to the project directory.
  • cd to web and run the command to create a new Laravel project into application directory.
  • cd .. to back the project directory.
  • cp .env.example .env to use env config file
  • Run docker-compose up -d to start the containers.
  • Visit http://localhost to see your Laravel application.
  • Try to connect 127.0.0.1:5432 to access Postgres
  • After starting, note that one directory and one file will be created with name postgres and file data, this files are Database archives

usage:

  • docker-compose up -d to start all containers
  • docker-compose down to stop all containers
  • If you need to restart after modifying docker-compose.yml restart with docker-compose down and docker-compose up -d

Images

  • redis:alpine
  • postgres:9.5-alpine
  • nginx:alpine
  • php71-fpm:latest

SourceFiles

Into sourcefiles directory, exists others directories: php-fpm and nginx:

php-fpm: Extensions PHP and PHP.INI

  • Dockerfile: php7.1-pgsql php7.1-gd php-redis
  • php-ini-overrides.ini

nginx: nginx.conf

  • file conf nginx

volumes:

  • nginx folder
  • php-ini-overrides.ini
  • data(postgres)

multiple servers:

  • create file conf of nginx in nginx directory you should use default.conf as exemple
  • restart containers: docker-compose down and docker-composer up -d

Troubleshooting

If you need to restart after modifying Dockerfile and have Troubleshooting:

  • Verify all containers running: docker ps -a
  • Stop all containers and remove: docker stop $(docker ps -a -q) and docker rm $(docker ps -a -q)
  • Try to start again docker-compose up -d

docker-laravel-postgres-nginx's People

Contributors

mlopez-aeduc avatar thayronarrais 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.