Skip to content

Commit 0f18568

Browse files
author
Sudheer Tripathi
committed
feat: add readme
1 parent 1f1a0ea commit 0f18568

3 files changed

Lines changed: 30 additions & 28 deletions

File tree

README.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
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

3537
To 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

4143
To 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

4951
Contributions 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

deno.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
"name": "@dcode/dcmv",
33
"version": "1.0.1",
44
"description": "Automatically update .env references to other containers when moving a container outside/inside docker",
5-
"exports": "./src/cli.ts",
5+
"exports": "./src/main.ts",
66
"publish": {
77
"include": [
88
"README.md",
99
"src/**/*.ts"
1010
]
1111
},
1212
"tasks": {
13-
"dev": "deno run -A src/cli.ts",
14-
"compile": "deno compile -A --output ./dcmv src/cli.ts",
13+
"dev": "deno run -A src/main.ts",
14+
"compile": "deno compile -A --output ./dcmv src/main.ts",
1515
"test": "deno test -A tests",
1616
"fmt": "deno fmt",
1717
"lint": "deno lint",
18-
"dev:inspect": "deno run --watch src/cli.ts"
18+
"dev:inspect": "deno run --watch src/main.ts"
1919
},
2020
"imports": {
2121
"@std/assert": "jsr:@std/assert@1",
File renamed without changes.

0 commit comments

Comments
 (0)