services: nginx: image: ghcr.io/jooyeshgar/freeamir-nginx:latest restart: unless-stopped ports: - '${APP_PORT:-80}:80' volumes: # Read-only: Nginx only needs to read user-uploaded files from storage - app-storage:/var/www/html/storage/app/public:ro networks: - freeamir depends_on: php-fpm: condition: service_healthy healthcheck: test: ['CMD-SHELL', 'wget -qO- http://localhost/health || exit 1'] interval: 30s timeout: 5s retries: 3 start_period: 10s php-fpm: image: ghcr.io/jooyeshgar/freeamir-app:latest restart: unless-stopped environment: APP_ENV: production APP_DEBUG: false APP_URL: '${APP_URL:-http://localhost}' DB_CONNECTION: mysql DB_HOST: mariadb DB_PORT: 3306 DB_DATABASE: '${DB_DATABASE:-freeamir}' DB_USERNAME: '${DB_USERNAME:-freeamir}' DB_PASSWORD: '${DB_PASSWORD:-change_me_strong_password}' CACHE_DRIVER: '${CACHE_DRIVER:-file}' SESSION_DRIVER: '${SESSION_DRIVER:-file}' QUEUE_CONNECTION: '${QUEUE_CONNECTION:-sync}' volumes: # Writable: PHP-FPM writes uploaded files and cache here - app-storage:/var/www/html/storage/app/public - app-logs:/var/www/html/storage/logs networks: - freeamir healthcheck: test: ['CMD-SHELL', 'php-fpm-healthcheck || exit 1'] interval: 10s timeout: 5s retries: 3 start_period: 30s depends_on: mariadb: condition: service_healthy mariadb: image: 'mariadb:11' restart: unless-stopped # ports: # - '${FORWARD_DB_PORT:-3306}:3306' environment: MYSQL_ROOT_PASSWORD: '${DB_ROOT_PASSWORD:-change_me_root_password}' MYSQL_ROOT_HOST: '%' MYSQL_DATABASE: '${DB_DATABASE:-freeamir}' MYSQL_USER: '${DB_USERNAME:-freeamir}' MYSQL_PASSWORD: '${DB_PASSWORD:-change_me_strong_password}' MYSQL_ALLOW_EMPTY_PASSWORD: 'no' volumes: - mariadb-data:/var/lib/mysql networks: - freeamir healthcheck: test: - CMD - healthcheck.sh - '--connect' - '--innodb_initialized' retries: 5 timeout: 5s interval: 10s phpmyadmin: image: phpmyadmin/phpmyadmin restart: unless-stopped ports: - '${PMA_PORT:-8080}:80' environment: PMA_HOST: mariadb PMA_USER: '${DB_USERNAME:-freeamir}' PMA_PASSWORD: '${DB_PASSWORD:-change_me_strong_password}' depends_on: - mariadb networks: - freeamir profiles: - tools networks: freeamir: driver: bridge volumes: mariadb-data: driver: local app-storage: driver: local app-logs: driver: local