Skip to content

Instantly share code, notes, and snippets.

@veewee
Last active August 19, 2016 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veewee/16f04110da28285822b5cfb4351b7524 to your computer and use it in GitHub Desktop.
Save veewee/16f04110da28285822b5cfb4351b7524 to your computer and use it in GitHub Desktop.
Demo Grumphp Satis server

How to run the satis server:

docker-compose up --build

How to use the satis server:

Watch the composer.json file as a sample.

Tips

  • Use hardcoded versions to make sure that you don't have to download the full internet.
  • Set the docker directory to your local composer directory. This way the packages that are loaded in cache will also be used by the atis server.
{
"name": "veewee/grumphp-demo",
"repositories": [
{"type": "composer", "url": "http://127.0.0.1:9000/"},
{"packagist": false}
],
"require-dev": {
"phpro/grumphp": "^0.7.2",
"phpspec/phpspec": "^2.4",
"squizlabs/php_codesniffer": "^2.5"
},
"autoload": {
"psr-0": {"": "src/"}
}
}
satis:
image: ypereirareis/docker-satis:4.0
environment:
CRONTAB_FREQUENCY: -1
volumes:
- ./satis.json:/app/config.json
# If this does not work: replace with the absolute path to your user directory
- "~/.composer:/root/.composer"
ports:
- 3333:3000
- 9000:80
{
"name": "Grumphp demo Repository",
"homepage": "http://127.0.0.1:9000",
"minimum-stability": "dev",
"repositories": [
{ "type": "composer", "url": "http://packagist.org/" }
],
"archive": {
"prefix-url": "http://127.0.0.1:9000",
"directory": "dist",
"format": "tar",
"skip-dev": true
},
"require-all": false,
"require-dependencies": true,
"require-dev-dependencies": false,
"require": {
"phpro/grumphp": "0.7.2",
"phpspec/phpspec": "2.4.0",
"squizlabs/php_codesniffer": "2.5.1"
},
"output-dir": "public",
"output-html": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment