Guest User

Untitled

a guest
Jul 2nd, 2024
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. version: '3.8'
  2.  
  3. services:
  4.  
  5. php:
  6. container_name: php
  7. build:
  8. context: .
  9. dockerfile: php-dockerfile
  10. volumes:
  11. - './public:/var/www/html'
  12. - './php-logging.conf:/usr/local/etc/php-fpm.d/zz-log.conf'
  13. environment:
  14. PHP_USER_ID: ${PHP_USER_ID:-0} # Set PHP user ID for correct file ownership
  15. depends_on:
  16. - mariadb
  17.  
  18. nginx:
  19. container_name: web
  20. build:
  21. context: .
  22. dockerfile: nginx-dockerfile # Ensure NGINX Dockerfile name is correct
  23. ports:
  24. - 8080:80
  25. volumes:
  26. - './public:/var/www/html'
  27. - './nginx-conf:/etc/nginx/conf.d'
  28. - './uploads:/var/www/html/uploads' # Ensure uploads directory is mounted
  29. environment:
  30. PHP_USER_ID: ${PHP_USER_ID:-0} # Same user ID as PHP container
  31. depends_on:
  32. - php
  33.  
  34. mariadb:
  35. container_name: db
  36. image: mariadb:10.9
  37. environment:
  38. MYSQL_ROOT_PASSWORD: 1234password
  39. volumes:
  40. - './mysqldata:/var/lib/mysql'
  41.  
  42. adminer:
  43. image: adminer
  44. restart: always
  45. ports:
  46. - 8088:8080
  47.  
  48. # Volumes
  49. volumes:
  50. mysqldata:
  51.  
  52.  
Add Comment
Please, Sign In to add comment