Tool for easier switching between projects that uses docker containers to set up working environment
Project description
Tool for easier switching between projects that uses docker containers to set up working environment
Usage
Usage: dockswap [OPTIONS] COMMAND [ARGS]...
DockSwap. Tool for swapping projects.
Commands:
add Register a composer for project
delete Delete registered composer
list List all registered composers
prune Prune existing registered composers.
start Start containers for registered composer
stop Stop containers for registered composer
stopall Stop (and/or remove) all running containers
version Show version of currently used dockswap
Adding composer
Usage: dockswap add [OPTIONS] PROJECT_NAME
Register a composer for project
Arguments:
PROJECT_NAME [required]
Options:
--path PATH Path to .yml or .json file that must be run using docker-
compose [required]
--env-path PATH If your docker-compose file uses env_file then specify path
for that file
Showing composers
Usage: dockswap list [OPTIONS]
List all registered composers
Options:
--full / --no-full show more info [default: False]
Starting
Usage: dockswap start [OPTIONS] PROJECT_NAME
Start containers for registered composer
Arguments:
PROJECT_NAME [required]
Options:
--remove-other / --no-remove-other
Remove stopped containers [default: False]
--dry / --no-dry Do not run command, instead just print it
[default: False]
Why?
If your are using docker containers to set up your working environment then this tool is for you. I used to do like this:
$ cd ~/projects/foo $ docker stop $(docker ps -aq) && docker rm $(docker ps -aq) $ docker-compose -f _dev/docker-compose.yml up -d
Then I want to switch to another project, and again:
$ cd ~/projects/bar $ docker stop $(docker ps -aq) && docker rm $(docker ps -aq) $ docker-compose -f _directory_with_another_name/docker-compose.yml up -d
This is a bit verbose for such a simple task. Now what I do is just:
$ dockswap start foo --remove-other
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dockswap-0.2.3.tar.gz
(12.6 kB
view details)
Built Distribution
File details
Details for the file dockswap-0.2.3.tar.gz
.
File metadata
- Download URL: dockswap-0.2.3.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff918add65c9adb69e5b462dec6ff7c815f91832e366ff9843deb0862a178a67 |
|
MD5 | 87e7ca46f2b86fc213a3ab02dd902ea4 |
|
BLAKE2b-256 | 97cb191d39b184662aa954011f9346e7cbe39f8ab4e0398fd5eb9c3681521015 |
File details
Details for the file dockswap-0.2.3-py2.py3-none-any.whl
.
File metadata
- Download URL: dockswap-0.2.3-py2.py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68d6709a42a55c27729614c5a763b5d94ea3c5748420d068f28b0116c123e2c1 |
|
MD5 | a7add6d3814a399a9772a18933bb0958 |
|
BLAKE2b-256 | 4f1ed98bf5d4f3d9f340ce167b7603bfcadde927eab84459ea2b784efb9addbd |