Git Product home page Git Product logo

flexhub's Introduction

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:

  • 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
  • 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"

Configure your composer.json to use your private 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 in composer.json. In that case, add the "endpoint" key to the existing extra.symfony entry.

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

flexhub's People

Contributors

sonnymilton avatar

Stargazers

 avatar Vasily Komrakov avatar Igor Karachentsev avatar Naman avatar Christian avatar Eric Enold avatar gnito-org avatar Jibé Barth avatar  avatar Stephan Hochdörfer avatar  avatar

Watchers

zero avatar  avatar

Forkers

kl3sk

flexhub's Issues

Need more informations

Hello,

I try your app and after somme issues to have it working, I didn't achived to use my testing private recipe

With the API response from https://[my host]/api/flex/index.json, I see the repository not pointing to my Git respositories, in fact I never configure it somewhere

image

Thus, is there any doc somewhere to properly configure a recipe in Flexhub ?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.