Coder Social home page Coder Social logo

pomdok's Introduction

pomdok ๐Ÿ

Simple wrapper to Symfony Go Binary for multi-app.

This README does not aim to explain Symfony binary, if you want more details you can read the article I made to introduce it or official documentation.

Installation ๐Ÿ’พ

pomdok is the only thing you have to install, the symfony binary will be automatically installed if not present on your computer.

Mac

You can install this binary through Homebrew:

brew tap jolicode/pomdok [email protected]:jolicode/pomdok.git
brew install pomdok

Linux

Download last release, extract it and you'll have the binary. I suggest you to put it in /usr/local/bin/ to be easier to use but you can do whatever you want ๐Ÿคท

Getting started ๐Ÿš€

First, you need a configuration file that we call pomdok.yaml in your project root as following:

pomdok:
  tld: 'test'
  projects:
    - domain: 'api.project'
      path: '/apps/api'
      port: 9990
    - domain: 'www.project'
      path: '/apps/front'
    - domain: 'admin.project'
      path: '/apps/back-office'

You'll need at least tld field and one project to have a valid configuration.

For each "project" you have, you'll need at least a domain and port fields. port field is optional and used to force a given port for your webserver.

You can add domain aliases for a project by duplicating its entry in the list and changing the domain name (path and port must remain the same), for example:

pomdok:
  tld: 'test'
  projects:
    - domain: 'api.project'
      path: '/apps/api'
      port: 9990
    - domain: 'api-private.project'
      path: '/apps/api'
      port: 9990

To init pomdok for your project run:

pomdok init

You can add --config=configuration.yaml option if your configuration file is not in current folder with default name pomdok.yaml.

Then to start your applications ๐ŸŽ‰

pomdok start

And to stop them:

pomdok stop

Symfony related

To make pomdok works, we're using symfony CLI. Some setup on this side is needed:

  • You have to setup Symfony CLI proxy (you can find how on this slide or on the official documentation)
  • And to install Symfony CLI certificate authority through symfony local:server:ca:install

Troubleshooting ๐Ÿค•

Some debug tips ๐Ÿ”ง

Because this tool use symfony CLI to run your servers, here is some advices to debug when need:

  • You can check running servers on http://127.0.0.1:7080/
  • You used start command but server is still stopped in the list ? Go in the app folder then use: symfony local:server:start, you'll have full logs and order to see what's happening !

Everything working but I have untrusted https โŒ

This tool does not run symfony ca:install command since it needs sudo. This install local certificate authority. Just run it and you'll have trusted https for you apps ๐Ÿ˜‰

My website isn't working ๐Ÿ˜ข

When you start pomdok, and you don't have the symfony proxy already launched, you're site won't be reachable. You have to close your web browser (really quit it, not reduce it like mac usually do).

Commands ๐Ÿ› 

init

pomdok init

Will sync your project with Symfony binary configuration. This command can run anywhere inside your project tree, it will search in current directory and will goes into parent one if nothing and again and again until finding your project configuration.

start

pomdok start

Will start symfony proxy if needed and all your apps

stop

pomdok start

Will stop all your apps

check

pomdok check

Will check your OS and needed binaries:

  • OS: should be Linux or Darwin (MacOS)
  • PHP: you need local php installation
  • Symfony: and the symfony binary ๐Ÿ˜‰

install

sudo pomdok install

Will install all needed binaries :

  • PHP: from apt or brew depending on OS
  • Symfony: with wget command โš  This command obviously needs sudo or being logged as root.

Sponsor

JoliCode

Open Source time sponsored by JoliCode

pomdok's People

Contributors

goreleaserbot avatar korbeil avatar michelv avatar ternel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pomdok's Issues

Docker support

Hi!

Pomdok is awesome but now with the docker support in SymfonyCLI, it would be great to have this feature on the pomdok side as well.

I had already discussed this some time ago with @Korbeil, can this feature be considered ?

Note: I have very little knowledge in Go. I'd love to do that but I am not sure to find the time to learn it and integrate it, so if someone is interesting.

homebrew warning : Calling bottle :unneeded is deprecated

Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the jolicode/pomdok tap (not Homebrew/brew or Homebrew/core):
/usr/local/Homebrew/Library/Taps/jolicode/homebrew-pomdok/Formula/pomdok.rb:6

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.