11# dcmv
22
3- Update .env references to other containers when running a container from outside docker.
3+ A CLI utility to update .env references to other containers when moving containers
4+ inside/outside docker.
45
6+ ` dcmv ` is short for docker-compose move.
7+ ` dcmv ` is useful in case you need to run certain containers outside docker for faster debugging or for tooling reasons.
8+
9+ ## Run from source
10+
11+ 1 . Make sure you have ` Deno ` installed on your system
12+ 2 . Compile to native binary
13+ ``` sh
14+ deno run compile
15+ ```
16+ 3 . Add to $PATH
17+ ``` sh
18+ mkdir -p $HOME /.dcmv
19+ mv ./dcmv $HOME /.dcmv
20+
21+ # Replace ~/.zshrc with your profile: ~/.bashrc, ~/.profile, etc
22+ echo ' export PATH="$PATH:$HOME/.dcmv"' >> ~ /.zshrc
23+ source ~ /.zshrc
24+ ```
525
626## Features
727
@@ -10,44 +30,26 @@ Update .env references to other containers when running a container from outside
1030- Provides a preview of the changes to be made before applying them.
1131- Supports multiple services and their dependencies.
1232
13- ## Usage
14-
15- To use this utility, run the following command in your terminal:
16-
17- ``` bash
18- deno run -A src/cli.ts
19- ```
20-
21- This will start the utility and guide you through the process of moving services
22- in or out of Docker containers.
23-
24- ## Options
25-
26- The utility accepts the following options:
27-
28- - ` --out ` or ` -o ` : Move the service outside Docker.
29- - ` --in ` or ` -i ` : Move the service inside Docker.
30- - ` --service ` or ` -s ` : Specify the service name to be moved.
31- - ` --help ` or ` -h ` : Display help and exit.
3233
33- ## Examples
34+ ## Usage Examples
35+ Run it in the directory which has your docker-compose file.
3436
3537To move a service named ` service1 ` outside Docker, run:
3638
3739``` bash
38- deno run src/cli.ts --out --s service1
40+ dcmv --out --s service1
3941```
4042
4143To move a service named ` service2 ` inside Docker, run:
4244
4345``` bash
44- deno run src/cli.ts --in --s service2
46+ dcmv --in --s service2
4547```
4648
4749## Contributing
4850
4951Contributions are welcome! If you'd like to contribute to this project, please
50- fork the repository, make your changes, and submit a pull request.
52+ fork the repository, make your changes, and submit a pull request. Likewise, if you find any issues with the tool, feel free to raise an issue.
5153
5254## License
5355
0 commit comments