mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Add dockerfile
This commit is contained in:
parent
ec8aad5fde
commit
a5c5d356bf
2 changed files with 41 additions and 0 deletions
26
docker/Dockerfile
Normal file
26
docker/Dockerfile
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
FROM docker.io/library/debian:latest
|
||||||
|
|
||||||
|
RUN apt update && apt install -y curl npm libssl-dev perl git
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash
|
||||||
|
RUN apt update && apt install -y nodejs
|
||||||
|
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable --profile minimal
|
||||||
|
RUN git clone https://github.com/ethanaobrien/ew.git
|
||||||
|
|
||||||
|
WORKDIR /ew/webui/
|
||||||
|
|
||||||
|
RUN npm i && npm run build
|
||||||
|
|
||||||
|
WORKDIR /ew/
|
||||||
|
|
||||||
|
RUN . "$HOME/.cargo/env" && cargo build --release
|
||||||
|
RUN mkdir /root/ew/ && cp target/release/ew /root/ew/ew
|
||||||
|
|
||||||
|
RUN echo "#!/bin/bash\n\n /root/ew/ew --path \"\${DIRECTORY:-/data/}\" --port \"\${PORT:-8080}\"" > /root/ew/start.sh
|
||||||
|
|
||||||
|
RUN chmod +x /root/ew/start.sh
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
RUN rm -rf /ew/
|
||||||
|
|
||||||
|
ENTRYPOINT ["/root/ew/start.sh"]
|
15
docker/docker-compose.yml
Normal file
15
docker/docker-compose.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
sif2-ew:
|
||||||
|
image: sif2-ew:latest
|
||||||
|
container_name: sif2-ew
|
||||||
|
build:
|
||||||
|
dockerfile: "./Dockerfile"
|
||||||
|
environment:
|
||||||
|
PORT: 8081
|
||||||
|
DIRECTORY: /data
|
||||||
|
ports:
|
||||||
|
- 8081:8081
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
restart: unless-stopped
|
Loading…
Add table
Reference in a new issue