togglempc 0.1.0

Togglempc is a small REST server that accepts HTTP post requests to toggle MPD on and off and switch playlist. (It is a client to MPD.) MPD is Music Play Daemon, see https://www.musicpd.org/. Togglempc can be used for home automation or smart switches can use it to control MPD instances.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#Simple Dockerfile to build togglempc as a docker image
FROM debian:stretch as build-togglempc

RUN apt-get update && apt-get install -y --no-install-recommends build-essential git curl ca-certificates && apt-get clean
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN git clone https://github.com/christianwicke/togglempc.git
RUN cd togglempc/ && /root/.cargo/bin/rustup override set nightly
RUN cd togglempc/ && /root/.cargo/bin/cargo build --release

FROM debian:stretch
COPY --from=build-togglempc /togglempc/target/release/togglempc .
COPY --from=build-togglempc /togglempc/sample-config.toml .
ENTRYPOINT ["/togglempc"]
CMD ["sample-config.toml"]