Skip to content

Commit

Permalink
feat(docker): add docker file and test it
Browse files Browse the repository at this point in the history
  • Loading branch information
NishantJoshi00 committed Oct 30, 2023
1 parent 107f53b commit 031d813
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Dockerfile
Expand Up @@ -15,16 +15,20 @@ RUN cargo build --release --features release ${EXTRA_FEATURES}

FROM debian:bookworm-slim

ARG CONFIG_DIR=/config
ARG BIN_DIR=/
ARG CONFIG_DIR=/local/config
ARG BIN_DIR=/local
ARG BINARY=locker

RUN apt-get update \
&& apt-get install -y ca-certificates tzdata libpq-dev curl procps

EXPOSE 8080

RUN mkdir -p ${CONFIG_DIR}

COPY --from=builder /locker/target/release/${BINARY} /${BINARY}
COPY --from=builder /locker/target/release/${BINARY} ${BIN_DIR}/${BINARY}

WORKDIR ${BIN_DIR}

CMD ./${BINARY}
CMD ./locker

7 changes: 7 additions & 0 deletions Makefile
@@ -0,0 +1,7 @@


docker-run:
docker run -v `pwd`/config/docker-configuration.toml:/local/config/development.toml locker -d

docker-it-run:
docker run -v `pwd`/config/docker-configuration.toml:/local/config/development.toml -it locker /bin/bash
10 changes: 10 additions & 0 deletions config/docker-configuration.toml
@@ -0,0 +1,10 @@
[server]
host = "127.0.0.1"
port = 8080

[database]
url = "postgres://sam:damn@localhost/locker"

[secrets]
tenant = "hyperswitch"
master_key = "feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308"

0 comments on commit 031d813

Please sign in to comment.