dockerify

This commit is contained in:
blek 2023-09-30 14:46:29 +10:00
parent a5d17d29aa
commit 014c031fbc
Signed by: blek
GPG Key ID: 14546221E3595D0C
5 changed files with 25 additions and 0 deletions

1
filed/.gitignore vendored
View File

@ -1 +1,2 @@
/target
Dockerfile

13
filed/Dockerfile.prod Normal file
View File

@ -0,0 +1,13 @@
# --- build ---
FROM rust:alpine as builder
WORKDIR /opt/build
COPY . .
RUN cargo b -r
# --- deploy ---
FROM alpine
COPY --from=builder /opt/build/target/release/filed /bin/filed
CMD [ "/bin/filed" ]

View File

@ -1,3 +1,8 @@
# fileD - file daemon
This is a part of blek! File that is responsible for serving and uploading files.
This module is released under the GPLv3 with additions, copy of which is included in the top level of this repository.
## Building
To get started with this, copy either `Dockerfile.dev` or `Dockerfile.prod` to `Dockerfile`, depending on your environment.
Then either build it manually or start it up using the `docker-compose.yml` file, which is provided in the top level directory.

6
filed/dev-entry.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
cargo check
cargo build
cargo watch -w src -w templates -x run