Skip to content

cristian1604/docker-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Server

Overview

A docker composer with three docker containers:

  • Apache + PHP 7.1
  • PostgreSQL
  • PgAdmin 4

Parameters

On docker-compose.yml file, there are four parameters to modify before run for first time docker-compose.

There are:

PgAdmin

  • DEFAULT_USER = root
  • DEFAULT_PASSWORD = changeMe

Postgres

  • POSTGRES_USER = root
  • POSTGRES_PASSWORD = changeMe

Install and run

Simply run

sudo sh docker-compose.sh up -d

And it's automatically start to download and install all dependences. The same thing to run the containers.

Configuration

The remaning configuration is set the timezone on Postgres and PHP servers.

Later I will to explain this.

Use it!

On your browser go to the following URLs:

PgAdmin4

localhost:5050

When add your server database, on the address to the database put db on port 5432. It will route to the postgres container.

Apache + PHP

localhost, or 127.0.0.1

Connect to PostgreSQL database

This use the standard Postgres port, wich is 5432

localhost:5432

Or from another docker container on this repository, using the address db.

By default this configuration allows incoming connections from the network. So it's ready to put on production quickly.

Remove the containers

To remove the three container instances run:

sudo sh docker-compose.sh down

Thanks to

Thanks to Martin Anacabe and his docker-lampp-symfony repository, which was a model and improvement to this one. I left their scripts on apache/scripts/ in case of you use Symfony framework, npm, nvm and want to preserve permissions of the host user.

About

Apache + PHP 7.1 - PostgreSQL - PgAdmin 4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages