HUB
Sign inSign up

brnshkr/forge-compose-php-worker:0.0.1-alpha.1

Manifest digest

sha256:eeff7bca0c58ba61bccaa462366edaed463a4406d75b087c2a6702e6d7233a9b

Last pushed

4 days by brnshkr

Type

Compose

Manifest digest

sha256:eeff7bca0c58ba61bccaa462366edaed463a4406d75b087c2a6702e6d7233a9b

Compose file content

services:
  php-worker:
    extends:
      file: ./base.yaml
      service: base
    image: "${FORGE_APP_IMAGE:-\
      ${FORGE_IMAGE_NAMESPACE:-\
      ${FORGE_NAMESPACE:?Set it to the namespace of Forge's images and fragments, e.g. `docker.io/brnshkr`.}}\
      /${FORGE_APP_IMAGE_NAME:-${FORGE_IMAGE_NAME:-forge}}\
      :${FORGE_TAG:?Set `FORGE_TAG` and `FORGE_APP_IMAGE_DIGEST`, or `FORGE_APP_IMAGE`.}-app\
      @${FORGE_APP_IMAGE_DIGEST:?Set `FORGE_TAG` and `FORGE_APP_IMAGE_DIGEST`, or `FORGE_APP_IMAGE`.}}"
    command: >-
      ${PHP_WORKER_COMMAND:-bin/console messenger:consume
      ${MESSENGER_TRANSPORTS:?Set it to the transports to consume, e.g. `async scheduler_default`.}
      --time-limit=${MESSENGER_TIME_LIMIT:-3600}
      --memory-limit=${MESSENGER_MEMORY_LIMIT:-128M}}
    working_dir: /app
    mem_limit: ${PHP_WORKER_CONTAINER_MEMORY_LIMIT:-512m}
    pids_limit: ${PHP_WORKER_CONTAINER_PIDS_LIMIT:-512}
    stop_grace_period: ${PHP_WORKER_STOP_GRACE_PERIOD:-60s}
    env_file:
      - path: ${FORGE_SHARED_DIR:-/app/var/shared}/.env.local
        required: false
      - path: ${FORGE_SHARED_DIR:-/app/var/shared}/.env.${DEPLOY_APP_ENV:-prod}.local
        required: false
      - path: ${FORGE_SHARED_DIR:-/app/var/shared}/.env.deploy.local
        required: false
    environment:
      APP_ENV: ${DEPLOY_APP_ENV:-prod}
      FORGE_RELEASE: ${FORGE_RELEASE:-}
    healthcheck:
      disable: true
    tmpfs:
      - /tmp:rw,nosuid,nodev,size=512m
      - /run:rw,nosuid,nodev,size=32m
      - ${FORGE_CACHE_DIR:-/app/var/cache}:rw,nosuid,nodev,size=512m,uid=${RUNTIME_USER_UID:-33},gid=${RUNTIME_USER_GID:-33},mode=0700
    volumes:
      - forge-var:${FORGE_VAR_DIR:-/app/var}

volumes:
  forge-var: ~
services:
  base:
    restart: unless-stopped
    logging:
      driver: local
    init: true
    read_only: true
    cap_drop:
      - ALL
    security_opt:
      - no-new-privileges:true

Docker commands

docker compose -f oci://brnshkr/forge-compose-php-worker:0.0.1-alpha.1 up

Use the above command to pull and run the Compose file. Learn more⁠.

Images used

No images found
No images were found in the Compose file.