BatchStrip is a OS-agnostic batch management platform inspired by MKVOptimizer. It runs in a dockerized container with a locally accessible Web GUI, much like Sonarr (has queue, can have different directories formatting differently, asynchronous processes), and integrates with MKVToolNix to provide easy batch management for baked-in tracks on your video files.
Elixir 1.12/OTP 24 Docker
Short version:
bash curl -fsSL https://get.docker.com -o get-docker.sh
git clone git@github.com:shakajones/batchstrip.git
docker compose build
docker compose up
-d
flag runs in detatched modedocker compose up --build
after stopping it if you need to mess with the image or if you're having dependency management issues.See all running containers with docker ps
and see all recent images with docker imasges
To use an interactive development console: Is the container currently running?
Mounts your app directory into the filesystem, so changes are propagated on the other side when made & the application will live reload. You can try this out: visit localhost:4000
& mess around with the copy in lib/groupstrip_web/templates/page/index.html.eex
, and refresh. You should see the application log its recompilation and the request logging, as well as seeing the frontend app!
a. if yes, then find the container name (default: batchstrip) and perform docker exec -it { container_name } iex -S mix phx.server
b. if no, then find the image name (default: emmajhyde/batchstrip:latest) you just built and perform docker run -it --rm { image_name} iex -S mix phx.server
c. use these same strategies for accessing the container filesystem/shell: docker exec -it batchstrip /bin/bash
will take you to the shell.
Mounts your app directory into the filesystem, so changes are propagated on the other side when made & the application will live reload. You can try this out: visit localhost:4000
& mess around with the copy in lib/batchstrip_web/templates/page/index.html.eex
, and refresh. You should see the application log its recompilation and the request logging, as well as seeing the frontend app!
Further explanation of steps and hints:
In order to develop locally with docker, execute: bash curl -fsSL https://get.docker.com -o get-docker.sh
(See more generic docker setup instructions in the docker documentation.)
git clone
this repository and cd
in.
Execute docker compose build
to build the image.
The resulting container will mount the current directory into its filesystem so that files you change locally will trigger live reload, etc. inside the container.
The dockerfile will not rebuild dependencies on its own because they're baked into the image. It's possible elixir will but I haven't tested it. You can use docker compose restart
to reboot the app, but in order to rebuild dependencies you should probably stop the container (ctrl+c) and docker compose up --build
. This will 100% trigger the dependencies to be rebuilt if you've changed them, or you can shell in with below instructions and perform the commands manually (mix deps.get
in /app
directory, npm install
in /app/assets
directory).
Execute docker compose up
to run the image.
mix phx.server
on port 4000
, tailing the debug logs to your console. That's it! It will behave exactly like you are running it locally, but it's actually running on a thin Alpine linux distribution.Start a container in detached mode with docker compose up -d
.
You can find the running container names with docker ps
.
If you'd like to look around inside the container or interact with the container command line, perform docker compose up -d
where the -d flag indicates that it will run in detached mode. Then execute
docker exec -it { container_name } /bin/bash
The container name is most likely batchstrip_phoenix_1
.
This will shell you into the container and its filesystem, much like ssh
.
If you'd like to start the interactive console, you have to run the build image instead of the compose specified up
process: elixir docker run -it --rm batchstrip:latest iex -S mix phx.server
Where batchstrip:latest
is the image name.
using docker images
will show you all of the images you have recently built.
Note: All the above commands handle the elixir commands inside the container implicitly. Technically there is no need to even install elixir on your local instance. IDE integrations for docker do allow you to pull dependencies from a container and use those deps, but if you'd like a local copy I am using asdf
for version management. See the next section for further details.
A manual installation is helpful in terms of using the CLI tooling whether or not the container is running. In theory, you will spend 90% of your time outside the container, so not super helpful to only have the CLI functionality (mix, iex, etc.) there. Think of docker as the npm install & npm start
, or bundle install & rails server
, of this application, but it won't hurt to be able to run it locally either. I will look into debugging in the container and see if I can simplify things.
Either way, non-dockerized installation instructions:
Install asdf with brew install asdf
Install plugin for elixir with asdf add plugin elixir
Install needed Elixir version with asdf install elixir 1.12.1-otp-24
Enable necessary Elixir version with asdf shell elixir 1.12.1-otp-24
- The .tool-versions
file will automatically enable this elixir version when you cd into the directory from now on (requires asdf to be installed).
Hex is the Elixir package manager, but it is not installed automatically. You can install Hex with mix local.hex
.
Check that the correct versions are enabled with elixir -v
.
Install Elixir and Node dependencies in root with mix setup
, which is a directive defined in the aliases in mix.exs
.
Start Phoenix endpoint from root with mix phx.server
Run the Batchstrip instide IEx (Interactive Elixir, basically, rails console
) with iex -S mix phx.server
Now you can visit localhost:4000 from your browser.
Ready to run in production? Please check our deployment guides.
Run:
recompile()
in iex to force compilation from inside the shell.
Official website: https://www.phoenixframework.org/
BatchStrip is a OS-agnostic batch management platform inspired by MKVOptimizer. It runs in a dockerized container with a locally accessible Web GUI, much like Sonarr (has queue, can have different directories formatting differently, asynchronous processes), and integrates with MKVToolNix to provide easy batch management for baked-in tracks on your video files.
Elixir 1.12/OTP 24 Docker
Short version:
bash curl -fsSL https://get.docker.com -o get-docker.sh
git clone git@github.com:shakajones/batchstrip.git
docker compose build
docker compose up
a. -d
flag runs in detatched mode
b. instead of 3 & 4, when you're comfortable feel free to run docker compose up --build
after stopping it if you need to mess with the image or if you're having dependency management issues.docker ps
and see all recent images with docker imasges
docker exec -it { container_name } iex -S mix phx.server
b. if no, then find the image name (default: emmajhyde/batchstrip:latest) you just built and perform docker run -it --rm { image_name} iex -S mix phx.server
c. use these same strategies for accessing the container filesystem/shell: docker exec -it batchstrip /bin/bash
will take you to the shell.localhost:4000
& mess around with the copy in lib/batchstrip_web/templates/page/index.html.eex
, and refresh. You should see the application log its recompilation and the request logging, as well as seeing the frontend app!Further explanation of steps and hints:
In order to develop locally with docker, execute: bash curl -fsSL https://get.docker.com -o get-docker.sh
(See more generic docker setup instructions in the docker documentation.)
git clone
this repository and cd
in.
Execute docker compose build
to build the image.
The resulting container will mount the current directory into its filesystem so that files you change locally will trigger live reload, etc. inside the container.
The dockerfile will not rebuild dependencies on its own because they're baked into the image. It's possible elixir will but I haven't tested it. You can use docker compose restart
to reboot the app, but in order to rebuild dependencies you should probably stop the container (ctrl+c) and docker compose up --build
. This will 100% trigger the dependencies to be rebuilt if you've changed them, or you can shell in with below instructions and perform the commands manually (mix deps.get
in /app
directory, npm install
in /app/assets
directory).
Execute docker compose up
to run the image.
mix phx.server
on port 4000
, tailing the debug logs to your console. That's it! It will behave exactly like you are running it locally, but it's actually running on a thin Alpine linux distribution.Start a container in detached mode with docker compose up -d
.
You can find the running container names with docker ps
.
If you'd like to look around inside the container or interact with the container command line, perform docker compose up -d
where the -d flag indicates that it will run in detached mode. Then execute
docker exec -it { container_name } /bin/bash
The container name is most likely batchstrip_phoenix_1
.
This will shell you into the container and its filesystem, much like ssh
.
If you'd like to start the interactive console, you have to run the build image instead of the compose specified up
process: elixir docker run -it --rm batchstrip:latest iex -S mix phx.server
Where batchstrip:latest
is the image name.
using docker images
will show you all of the images you have recently built.
Note: All the above commands handle the elixir commands inside the container implicitly. Technically there is no need to even install elixir on your local instance. IDE integrations for docker do allow you to pull dependencies from a container and use those deps, but if you'd like a local copy I am using asdf
for version management. See the next section for further details.
A manual installation is helpful in terms of using the CLI tooling whether or not the container is running. In theory, you will spend 90% of your time outside the container, so not super helpful to only have the CLI functionality (mix, iex, etc.) there. Think of docker as the npm install & npm start
, or bundle install & rails server
, of this application, but it won't hurt to be able to run it locally either. I will look into debugging in the container and see if I can simplify things.
Either way, non-dockerized installation instructions: 1. Install asdf with brew install asdf
1. Install plugin for elixir with asdf add plugin elixir
1. Install needed Elixir version with asdf install elixir 1.12.1-otp-24
1. Enable necessary Elixir version with asdf shell elixir 1.12.1-otp-24
- The .tool-versions
file will automatically enable this elixir version when you cd into the directory from now on (requires asdf to be installed). 5. Hex is the Elixir package manager, but it is not installed automatically. You can install Hex with mix local.hex
. 1. Check that the correct versions are enabled with elixir -v
.
Install Elixir and Node dependencies in root with mix setup
, which is a directive defined in the aliases in mix.exs
.
Start Phoenix endpoint from root with mix phx.server
Run the Batchstrip instide IEx (Interactive Elixir, basically, rails console
) with iex -S mix phx.server
Now you can visit localhost:4000 from your browser.
Ready to run in production? Please check our deployment guides.
Run:
recompile()
in iex to force compilation from inside the shell.
Official website: https://www.phoenixframework.org/