Skip to content

tiwut/tiwut-php-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tiwut's First PHP Docker Server

This is my very first custom Docker image! 🚀

Description

A simple PHP Apache server environment created as a learning project. It serves a basic PHP application using Docker and Docker Compose.

Author

  • Tiwut (tiwutdev)

Features

  • PHP 8.2-apache base image.
  • Docker Compose support for easy local development.
  • Auto-sync using volumes (local changes reflect immediately in the container).

Configuration (docker-compose.yml)

You can use this YAML file to start the container quickly:

version: '3.8'

services:
  php-server:
    build:
      context: .
      dockerfile: Dockerfile
    
    image: tiwutdev/tiwut-php-server:v1
    container_name: tiwut-prod-app
    
    restart: unless-stopped
    
    ports:
      - "8080:80"
    
    deploy:
      resources:
        limits:
          cpus: '0.50'
          memory: 512M
        reservations:
          memory: 128M
    
    volumes:
      - .:/var/www/html
      - php-logs:/var/log/apache2
    
    environment:
      - APP_ENV=production
      - PHP_MEMORY_LIMIT=256M
    
volumes:
  php-logs: