/docker-php-template

Docker for PHP Deployment Template

Primary LanguageShell

Docker PHP Deployment Template

This repository contains example of deployment implementation docker and docker-compose for PHP project. This example is using docker images from dimaskiddo docker hub repository.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Prequisites package:

  • Docker (Application Containerization)
  • Docker-Compose (Docker Orchestration Tools)

Deployment for Development

Standard deployment:

  • Clone this repository to your current directory, make sure it's empty
git clone -b master https://github.com/dimaskiddo/docker-php-template.git .
  • Change environment variables in env directory
  • Prepare PHP deployment
chmod +x prepare.sh
./prepare.sh
  • Build services image
docker compose build node web
  • Start PHP environment services
docker compose up -d mariadb redis minio adminer
docker compose up -d node web

Accessing Services

Accessing Database Service

You can access / connect to your MariaDB or browse it using Adminer service with information below

  • Hostname: mariadb
  • Port: 3306
  • Username: as declared in environment file
  • Password: as declared in environment file

Accessing Cache Service

You can access / connect to your Redis cache with information below

  • Hostname: redis
  • Port: 6379
  • Password: as declared in environment file

Accessing Storage Service

You can access / connect to your MinIO cache with information below

  • Web UI: http://localhost:9000 or http://127.0.0.1:9000
  • Hostname: minio
  • Port: 9000
  • Access Key: as declared in environment file
  • Secret Key: as declared in environment file

Built With

Authors

  • Dimas Restu Hidayanto - Initial Work - DimasKiddo

See also the list of contributors who participated in this project