fork download
  1. # podman-compose.yml
  2.  
  3. version: '3.8'
  4.  
  5. services:
  6. # PHP-FPM Service
  7. php:
  8. build:
  9. context: . # Build context is current directory
  10. dockerfile: Containerfile_PHP-FPM
  11. image: tw-phpfpm:latest # Image name
  12. container_name: phpfpm # Name our container
  13. ports:
  14. - "9003:9003" # Map port 8080 on our PC to 80 in container
  15. volumes:
  16. - ./htdocs:/srv/www/htdocs:Z # Mount document root
  17. - ./php-fpm/www.conf:/etc/php8/fpm/php-fpm.d/www.conf:Z
  18. - ./php-fpm/php-fpm.conf:/etc/php8/fpm/php-fpm.conf:Z
  19. - ./php-fpm/php.ini:/etc/php8/fpm/php.ini:Z
  20. privileged: true
  21. networks:
  22. - web_network # Connect to our network
  23. #environment:
  24. # PHP_IDE_CONFIG: serverName=Podman # For Xdebug
  25. restart: unless-stopped # Make container restart unless stopped manually
  26. security_opt:
  27. - apparmor=unconfined
  28.  
  29. # Nginx Service
  30. nginx:
  31. build:
  32. context: . # Build context is current directory
  33. dockerfile: Containerfile_NginX
  34. image: tw-nginx:latest # Image name
  35. container_name: nginx
  36. ports:
  37. - "8080:80" # Map port 8080 on our PC to 80 in container
  38. volumes:
  39. - ./htdocs:/srv/www/htdocs:Z # Mount same source code
  40. - ./nginx/nginx.conf:/etc/nginx/nginx.conf:Z
  41. depends_on:
  42. - php # Wait for PHP container
  43. links:
  44. - php
  45. privileged: true
  46. networks:
  47. - web_network
  48. restart: unless-stopped
  49. security_opt:
  50. - apparmor=unconfined
  51.  
  52. networks:
  53. web_network:
  54. driver: bridge # Standard Podman network type
  55.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty