diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c41cc9e --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +/target \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..83aa851 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM rust:slim + +RUN apt-get update && apt-get install curl build-essential libssl-dev musl-tools -y + +WORKDIR /myapp + +COPY . . + +RUN rustup target add x86_64-unknown-linux-musl +RUN cargo build --release --target=x86_64-unknown-linux-musl + +CMD ["/myapp/target/x86_64-unknown-linux-musl/release/fl-server", "--config-path", "config.toml"] +EXPOSE 3000 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..367ecf5 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +services: + fl-server: + build: . + ports: + # : + - 3000:3000