Flexhub is a private repository of Symfony Flex recipes available for deployment on your infrastructure. Compatible with Flex serverless.
Flexhub is distributed as a Docker image, which makes it easy to deploy.
docker pull sonnymilton/flexhub:latest
- The application requires PostgreSQL and Redis to run.
- You must set environment variables:
- DATABASE_URL - PostgreSQL database DSN.
Example:postgresql://user:password@localhost:5432/flex_server?serverVersion=16&charset=utf8
- REDIS_URL - Redis server DSN.
Example:redis://localhost:6379
- DATABASE_URL - PostgreSQL database DSN.
- Inside the container, the application runs on port 80
docker-compose.yml example
services:
flexhub:
image: sonnymilton/flexhub:0.1.0
tty: true
environment:
REDIS_URL: redis://redis:6379
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/flex_server?serverVersion=16&charset=utf8
ports:
- "8080:80"
depends_on:
- postgres
- redis
redis:
image: eqalpha/keydb:alpine_x86_64_v6.3.4
postgres:
image: postgres:16.2-alpine
environment:
POSTGRES_DB: flex_server
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Kubernetes manifest example
apiVersion: v1
kind: Pod
metadata:
name: flexhub-demo
spec:
containers:
- name: flexhub
image: sonnymilton/flexhub:latest
ports:
- containerPort: 80
env:
- name: REDIS_URL
value: "redis://localhost:6379"
- name: DATABASE_URL
value: "postgresql://user:password@localhost:5432/flex_server?serverVersion=16&charset=utf8"
- name: redis
image: redis:latest
ports:
- containerPort: 6379
- name: postgres
image: postgres:16.2
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: "user"
- name: POSTGRES_PASSWORD
value: "password"
- name: POSTGRES_DB
value: "flex_server"
"extra": {
"symfony": {
"endpoint": [
"https://flexhub.yourhost.lan/api/flex/index.json",
"flex://defaults"
]
}
}
- Replace
https://flexhub.yourhost.lan
with the host on which your flex recipes server is deployed. - The
extra.symfony
key will most probably already exist incomposer.json
. In that case, add the"endpoint"
key to the existingextra.symfony
entry.
docker-compose up -d
.
The application runs on port 8000.
Use composer cq
to run PHPstan + php-cs-fixer + phpunit
โ No outdated dependencies