# podman-compose.yml
version: '3.8'
services:
# PHP-FPM Service
php:
build:
context: . # Build context is current directory
dockerfile: Containerfile_PHP-FPM
image: tw-phpfpm:latest # Image name
container_name: phpfpm # Name our container
ports:
- "9003:9003" # Map port 8080 on our PC to 80 in container
volumes:
- ./htdocs:/srv/www/htdocs:Z # Mount document root
- ./php-fpm/www.conf:/etc/php8/fpm/php-fpm.d/www.conf:Z
- ./php-fpm/php-fpm.conf:/etc/php8/fpm/php-fpm.conf:Z
- ./php-fpm/php.ini:/etc/php8/fpm/php.ini:Z
privileged: true
networks:
- web_network # Connect to our network
#environment:
# PHP_IDE_CONFIG: serverName=Podman # For Xdebug
restart: unless-stopped # Make container restart unless stopped manually
security_opt:
- apparmor=unconfined
# Nginx Service
nginx:
build:
context: . # Build context is current directory
dockerfile: Containerfile_NginX
image: tw-nginx:latest # Image name
container_name: nginx
ports:
- "8080:80" # Map port 8080 on our PC to 80 in container
volumes:
- ./htdocs:/srv/www/htdocs:Z # Mount same source code
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:Z
depends_on:
- php # Wait for PHP container
links:
- php
privileged: true
networks:
- web_network
restart: unless-stopped
security_opt:
- apparmor=unconfined
networks:
web_network:
driver: bridge # Standard Podman network type