adding docker and docker compose files to make app ready for deployment

This commit is contained in:
2021-09-05 20:53:21 +02:00
parent d672849a25
commit bf0e8f6306
5 changed files with 44 additions and 7 deletions

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM rust:1.54 as builder
RUN apt-get update && apt-get install -y sqlite3 && rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/ics-proxy
COPY . .
RUN cd db && ./create_db.sh
RUN cargo install --path .
FROM debian:buster-slim
RUN apt-get update && apt-get install -y sqlite3 openssl && rm -rf /var/lib/apt/lists/*
WORKDIR app
COPY --from=builder /usr/local/cargo/bin/ics-proxy ./ics-proxy
COPY --from=builder /usr/src/ics-proxy/db db
COPY templates ./templates
CMD ["./ics-proxy"]