mirror of https://github.com/PiyushXCoder/lupt.git
Dockerfiles
This commit is contained in:
parent
69c408a824
commit
5b0eae45ee
|
|
@ -0,0 +1 @@
|
||||||
|
/target
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
FROM rust:1.58-alpine as builder
|
||||||
|
|
||||||
|
ENV PATH="/app/bin:${PATH}"
|
||||||
|
|
||||||
|
RUN mkdir -pv /app
|
||||||
|
COPY ./Cargo.toml /app
|
||||||
|
COPY ./Cargo.lock /app
|
||||||
|
COPY ./config.json /app
|
||||||
|
COPY ./run-lupt.sh /app/bin/run-lupt.sh
|
||||||
|
COPY ./src /app/src
|
||||||
|
COPY ./static /app/static
|
||||||
|
|
||||||
|
RUN apk upgrade --update-cache --available
|
||||||
|
RUN apk add musl-dev openssl-dev
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN cargo build
|
||||||
|
RUN cp -v target/debug/lupt bin
|
||||||
|
RUN cargo clean
|
||||||
|
|
||||||
|
RUN chmod 755 bin/run-lupt.sh
|
||||||
|
|
||||||
|
CMD ["run-lupt.sh"]
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
lupt:
|
||||||
|
container_name: lupt-server
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo => Starting lupt server
|
||||||
|
/app/bin/lupt --config-file /app/config.json --static_path /app/static --bind_address 0.0.0.0 --port 8080
|
||||||
Loading…
Reference in New Issue