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
#!/bin/bash | |
# remove exited containers: | |
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v | |
# remove unused images: | |
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi | |
# remove unused volumes: | |
docker volume ls -f dangling=true | awk '{ print $2 }' | xargs docker volume rm |
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
#!/bin/bash | |
# | |
# Based on https://gist.github.com/olivertappin/e5920e131db9a451c91aa6e2bc24dc40 | |
# | |
INSTALL_DIR=/opt/phpstorm | |
if [ "$(whoami)" != "root" ] | |
then |
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
namespace :symfony do | |
namespace :parameters do | |
desc "Create parameters.yml file based on the parameters.yml.dist one. Ask for all parameters." | |
task :create do | |
on roles(:all) do | |
if not test("[ -f #{shared_path}/app/config/parameters.yml ]") | |
distParameters = YAML::load(capture("cat #{release_path}/app/config/parameters.yml.dist")) | |
parameters = { "parameters" => {} } | |
distParameters['parameters'].each do |k,v| |