A little application displaying API data from GitHub, StackOverflow, ... Built with Phundament nano.
- docker
- docker-compose >=1.5.2
Instant test-drive with docker-compose
mkdir thatsme && cd thatsme
curl -o docker-compose.yml https://raw.githubusercontent.com/schmunk42/nano-thatsme/master/docker-compose.yml
docker-compose up
Download the latest release and start by setting up the vendor
folder
for local development and code-completion
cp .env-dist .env
docker-compose run php composer install
Start stack
docker-compose up -d
Check the logs, especially when you are starting a fresh stack, since the setup may take a minute
docker-compose logs
When you see Application initialized.
you are ready to open the application in your browser
OS X
open http://192.168.99.100:8023
Ubuntu
xdg-open http://192.168.99.100:8023
To customize the application you have the following options.
You can override files on the base-image as layed out in Phundament's src
folder.
By default we're adding the src folder to the built image, see ADD
for details how this works.
Add your custom configuration opions to src/config/local.php
.
A large part of an application usually consists of libraries. To use an library, find the package
you want to install and edit your composer.json
file, afterwards run
docker-compose run --rm php composer update
Start a bash in the PHP container to run yii
, composer
or other commands.
docker-compose run --rm php bash
By default there is cms
folder mounted in docker-compose.yml
. You can create a skeleton module there by entering
an application bash and run the following command inside the PHP container
$ yii gii/module --moduleID=cms --moduleClass=app\\modules\\cms\\Module
For more in information see
Build your image
docker-compose build
Tag it
docker tag -f nano_php registry/vendor/image
And push it to a registry
docker push registry/vendor/image
Alternative build-script
COMPOSE_PROJECT_NAME=nanousrbinde IMAGE_NAME=schmunk42/thatsme sh build/scripts/deploy.sh
Built by *dmstr, Stuttgart 🇩🇪