Sign inSign up

fabianacero/finalproject

By fabianacero

Updated almost 10 years ago

Proyecto final curso Docker. Conexion de dos cajas, una con nginx y otra con postgres

Image
0

10K+

fabianacero/finalproject repository overview

NGINX, PHP and POSTGRES Environment

alt tag

USAGE

For this awesome project you need to run the following commands:

  • Run DB Container:
docker run --name pgdb -e POSTGRES_PASSWORD=C4mbi0 -d postgres
  • Run NGINX Container:
docker run -d --name ngxweb --link pgdb fabianacero/finalproject
  • Finally you can access your NGINX container from you web browser using the container's ip:
docker inspect -f "{{ .NetworkSettings.Networks.bridge.IPAddress }}" ngxweb
  • If you want to put your domain you can add it to the host file. Remember! to replace yourdomain by your own:
echo -e "$(docker inspect -f "{{ .NetworkSettings.Networks.bridge.IPAddress }}" ngxweb)\tyourdomain.com" >> /etc/hosts

Tag summary

Content type

Image

Digest

Size

314 MB

Last updated

almost 10 years ago

docker pull fabianacero/finalproject