Skip to content

bewithdhanu/Codeigniter-PostgreSQL-with-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeIgniter PostgreSQL with Docker

This repository contains a sample application that demonstrates how to use the CodeIgniter PHP framework with a PostgreSQL database, all running within Docker containers.

Requirements

  • Docker
  • Docker Compose

Installation

  1. Clone the repository to your local machine:

git clone https://github.com/bewithdhanu/Codeigniter-PostgreSQL-with-docker.git

  1. Navigate to the project directory:

cd Codeigniter-PostgreSQL-with-docker

  1. Build and start the Docker containers:

docker-compose up -d

  1. Install the required dependencies using Composer:

docker-compose run --rm php composer install

  1. Visit the application in your web browser at http://localhost:8080.

Configuration

The application is configured to use the following environment variables:

  • DB_HOST: The hostname of the PostgreSQL server.
  • DB_PORT: The port number of the PostgreSQL server.
  • DB_NAME: The name of the PostgreSQL database.
  • DB_USER: The username to use when connecting to the PostgreSQL database.
  • DB_PASS: The password to use when connecting to the PostgreSQL database.

These environment variables can be set in the docker-compose.yml file.

License

This repository is licensed under the MIT License. See the LICENSE file for more information.

Credits

This repository was created by Dhanu K.

References

Conclusion

This is a basic example of how to use CodeIgniter with PostgreSQL and Docker. Feel free to use this as a starting point for your own applications!

About

PHP 7.3, Codeigniter 3 and PostgreSQL with docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages