$ # Depending on your terminal (sh, bash, zsh) it may display errors or warning. But it will work ;)
$ source ./functions.sh
$ php --version # execute php inside the container and accept any arguments
$ dev # execute the symfony console on dev mode and accept any arguments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
nginx: | |
networks: | |
traefik: | |
aliases: | |
- 'local.app' | |
labels: | |
traefik.enable: 'true' | |
traefik.http.services.myapp.loadbalancer.server.port: '80' | |
traefik.http.routers.myapp.rule: 'Host(`local.app`)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## --------------- | |
## Setup | |
## --------------- | |
CURRENT_BASH=$(ps -p $$ | tail -n 1 | awk '{ print $4 }' | perl -pe 's#.*[-/](\w)#$1#'); | |
case "${CURRENT_BASH}" in | |
zsh) | |
CURRENT_DIR=$(cd "$(dirname "${0}")" && pwd); | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NGROK_AUTH=My_auth_token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM scratch as app | |
WORKDIR /app | |
COPY . . | |
RUN chmod +x docker-entrypoint.sh | |
FROM whatever |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class OverrideFosRestServicesPass implements CompilerPassInterface | |
{ | |
/** | |
* {@inheritdoc} | |
*/ | |
public function process(ContainerBuilder $container) | |
{ | |
if ($container->hasDefinition('fos_rest.exception_listener')) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG SOURCE=mysource | |
FROM ${CODE_VERSION} | |
#some common actions | |
RUN ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use GuzzleHttp\HandlerStack; | |
use GuzzleHttp\Promise\FulfilledPromise; | |
use GuzzleHttp\Psr7\Response; | |
use InvalidArgumentException; | |
use Psr\Container\ContainerInterface; | |
use Psr\Http\Message\RequestInterface; | |
use Symfony\Component\Finder\Finder; | |
use Symfony\Component\Finder\SplFileInfo; |