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.
pomdok is the only thing you have to install, the symfony binary will be automatically installed if not present on your computer.
You can install this binary through Homebrew:
brew tap jolicode/pomdok [email protected]:jolicode/pomdok.git
brew install pomdok
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 ๐คท
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
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
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 !
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 ๐
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).
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.
pomdok start
Will start symfony proxy if needed and all your apps
pomdok start
Will stop all your apps
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 ๐
sudo pomdok install
Will install all needed binaries :
- PHP: from
apt
orbrew
depending on OS - Symfony: with
wget
command โ This command obviously needssudo
or being logged as root.
Open Source time sponsored by JoliCode