sonnymilton / flexhub

Server for private Symfony Flex recipes
MIT License
11 stars 1 forks source link

Flexhub App build

Flexhub is a private repository of Symfony Flex recipes available for deployment on your infrastructure. Compatible with Flex serverless.

Deployment

Flexhub is distributed as a Docker image, which makes it easy to deploy.

docker pull sonnymilton/flexhub:latest

Important details:

docker-compose.yml example ```yaml 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 ```yaml 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" ```

Configure your composer.json to use your private flex server

"extra": {
    "symfony": {
        "endpoint": [
            "https://flexhub.yourhost.lan/api/flex/index.json",
            "flex://defaults"
        ]
    }
}

Development

Local deployment

docker-compose up -d.
The application runs on port 8000.

Running code quality tools locally

Use composer cq to run PHPstan + php-cs-fixer + phpunit

Made with

php logo symfony logo doctrine logo composer logo typescript logo vuejs logo bootstrap logo npm logo postgresql logo redis logo nginx logo docker logo

✅ No outdated dependencies