cphalcon Docker & Self-Hosted Deployment

GitHub

High performance, full-stack PHP framework delivered as a C extension.

RAW Compose
1. Pull Image (DOCKERHUB) docker pull library/mariadb
2. Docker Run (1-Click Launch) docker run -d --name cphalcon --restart always mariadb:10.6
3. Podman Run podman run -d --name cphalcon --restart always mariadb:10.6
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/library/mariadb:10.6
5. ORAS Pull (OCI Artifact) oras pull mariadb:10.6
6. Compose Deployment docker compose up -d
docker-compose.yml
Download .yml
# For local development only.

name: ${PROJECT_PREFIX:-cphalcon}

services:
  cphalcon-dev-8.1:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-8.1
    hostname: ${PROJECT_PREFIX:-cphalcon}-dev-81
    build:
      dockerfile: resources/docker/develop/Dockerfile
      target: dev
      args:
        PHP_VERSION: 8.1
        UID: ${UID:-1000}
        GID: ${GID:-1000}
    working_dir: /srv
    volumes:
      - .:/srv
    extra_hosts:
      - "host.docker.internal:host-gateway"

  cphalcon-dev-8.2:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-8.2
    hostname: ${PROJECT_PREFIX:-cphalcon}-dev-82
    build:
      dockerfile: resources/docker/develop/Dockerfile
      target: dev
      args:
        PHP_VERSION: 8.2
        UID: ${UID:-1000}
        GID: ${GID:-1000}
    working_dir: /srv
    volumes:
      - .:/srv
    extra_hosts:
      - "host.docker.internal:host-gateway"

  cphalcon-dev-8.3:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-8.3
    hostname: ${PROJECT_PREFIX:-cphalcon}-dev-83
    build:
      dockerfile: resources/docker/develop/Dockerfile
      target: dev
      args:
        PHP_VERSION: 8.3
        UID: ${UID:-1000}
        GID: ${GID:-1000}
    working_dir: /srv
    volumes:
      - .:/srv
    extra_hosts:
      - "host.docker.internal:host-gateway"

  cphalcon-dev-8.4:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-8.4
    hostname: ${PROJECT_PREFIX:-cphalcon}-dev-84
    build:
      dockerfile: resources/docker/develop/Dockerfile
      target: dev
      args:
        PHP_VERSION: 8.4
        PHP_DIGEST: sha256:b0d7dff8f2d57155aebb5150dfcb5056a8c8d977aac3c2e21cfce32b8a4b004d
        UID: ${UID:-1000}
        GID: ${GID:-1000}
    working_dir: /srv
    volumes:
      - .:/srv
    extra_hosts:
      - "host.docker.internal:host-gateway"

  cphalcon-dev-8.5:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-8.5
    hostname: ${PROJECT_PREFIX:-cphalcon}-dev-85
    build:
      dockerfile: resources/docker/develop/Dockerfile
      target: dev
      args:
        PHP_VERSION: 8.5
        UID: ${UID:-1000}
        GID: ${GID:-1000}
    working_dir: /srv
    volumes:
      - .:/srv
    extra_hosts:
      - "host.docker.internal:host-gateway"

  cphalcon-bench-8.4:
    container_name: ${PROJECT_PREFIX:-cphalcon}-bench-8.4
    hostname: ${PROJECT_PREFIX:-cphalcon}-bench-84
    profiles:
      - bench
    build:
      dockerfile: resources/docker/develop/Dockerfile
      target: bench
      args:
        PHP_VERSION: 8.4
        PHP_DIGEST: sha256:b0d7dff8f2d57155aebb5150dfcb5056a8c8d977aac3c2e21cfce32b8a4b004d
        UID: ${UID:-1000}
        GID: ${GID:-1000}
    working_dir: /srv
    volumes:
      - .:/srv

  mariadb:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-mariadb
    image: mariadb:10.6
    environment:
      - MYSQL_ROOT_PASSWORD=secret
      - MYSQL_USER=phalcon
      - MYSQL_DATABASE=phalcon
      - MYSQL_PASSWORD=secret
    extra_hosts:
      - "host.docker.internal:host-gateway"

  mysql:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-mysql
    image: mysql:8.0
    environment:
      - MYSQL_ROOT_PASSWORD=secret
      - MYSQL_USER=phalcon
      - MYSQL_DATABASE=phalcon
      - MYSQL_PASSWORD=secret
    extra_hosts:
      - "host.docker.internal:host-gateway"

  postgres:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-postgres
    image: postgres:18-alpine
    environment:
      - POSTGRES_PASSWORD=secret
      - POSTGRES_USER=phalcon
      - POSTGRES_DB=phalcon
    extra_hosts:
      - "host.docker.internal:host-gateway"

  redis:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-redis
    image: redis:8-alpine
    extra_hosts:
      - "host.docker.internal:host-gateway"

  redis-node-0:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-redis-node-0
    image: docker.io/bitnamilegacy/redis-cluster:8.2
    environment:
      - 'REDIS_PASSWORD=bitnami'
      - 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
    extra_hosts:
      - "host.docker.internal:host-gateway"

  redis-node-1:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-redis-node-1
    image: docker.io/bitnamilegacy/redis-cluster:8.2
    environment:
      - 'REDIS_PASSWORD=bitnami'
      - 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
    extra_hosts:
      - "host.docker.internal:host-gateway"

  redis-node-2:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-redis-node-2
    image: docker.io/bitnamilegacy/redis-cluster:8.2
    environment:
      - 'REDIS_PASSWORD=bitnami'
      - 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
    extra_hosts:
      - "host.docker.internal:host-gateway"

  redis-node-3:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-redis-node-3
    image: docker.io/bitnamilegacy/redis-cluster:8.2
    environment:
      - 'REDIS_PASSWORD=bitnami'
      - 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
    extra_hosts:
      - "host.docker.internal:host-gateway"

  redis-node-4:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-redis-node-4
    image: docker.io/bitnamilegacy/redis-cluster:8.2
    environment:
      - 'REDIS_PASSWORD=bitnami'
      - 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
    extra_hosts:
      - "host.docker.internal:host-gateway"

  redis-node-5:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-redis-node-5
    image: docker.io/bitnamilegacy/redis-cluster:8.2
    depends_on:
      - redis-node-0
      - redis-node-1
      - redis-node-2
      - redis-node-3
      - redis-node-4
    environment:
      - 'REDIS_PASSWORD=bitnami'
      - 'REDISCLI_AUTH=bitnami'
      - 'REDIS_CLUSTER_REPLICAS=1'
      - 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
      - 'REDIS_CLUSTER_CREATOR=yes'
    extra_hosts:
      - "host.docker.internal:host-gateway"

  memcached:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-memcached
    image: memcached:1.6-alpine
    extra_hosts:
      - "host.docker.internal:host-gateway"

  beanstalkd:
    container_name: ${PROJECT_PREFIX:-cphalcon}-dev-beanstalkd
    image: schickling/beanstalkd:latest
    extra_hosts:
      - "host.docker.internal:host-gateway"