Matthieu Bessat
b79d989f78
Allow to specify a task to be running on a remote host via wrapping command around ssh client.
24 lines
803 B
Docker
24 lines
803 B
Docker
FROM rust:1.80-alpine3.20 as builder
|
|
WORKDIR /usr/src/autotasker
|
|
COPY . .
|
|
RUN apk add musl-dev
|
|
RUN cargo install --locked --path .
|
|
|
|
FROM alpine:3.20
|
|
|
|
RUN apk add sqlite openssh
|
|
COPY --from=builder /usr/local/cargo/bin/autotasker /usr/local/bin/autotasker
|
|
RUN mkdir -p /usr/local/src/autotasker/migrations
|
|
RUN mkdir -p /usr/local/lib/autotasker/assets
|
|
RUN mkdir -p /var/lib/autotasker
|
|
RUN mkdir -p /etc/autotasker
|
|
COPY --from=builder /usr/src/autotasker/migrations/all.sql /usr/local/src/autotasker/migrations
|
|
COPY --from=builder /usr/src/autotasker/init_db.sh /usr/local/bin/autotasker_init_db.sh
|
|
COPY --from=builder /usr/src/autotasker/assets /usr/local/lib/autotasker/assets
|
|
|
|
USER 1000
|
|
ENV RUST_LOG=info
|
|
ENV RUST_BACKTRACE=1
|
|
|
|
CMD ["autotasker", "--listen-host", "127.0.0.1", "--listen-port", "8080"]
|
|
|