mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
add docker & docker compose support
This commit is contained in:
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM python:3.12.2-bookworm as base
|
||||
WORKDIR /opt/hyperglass
|
||||
ENV HYPERGLASS_APP_PATH=/etc/hyperglass
|
||||
ENV HYPERGLASS_HOST=0.0.0.0
|
||||
ENV HYPERGLASS_PORT=8001
|
||||
ENV HYPERGLASS_DEBUG=false
|
||||
ENV HYPERGLASS_DEV_MODE=false
|
||||
ENV HYPERGLASS_REDIS_HOST=redis
|
||||
ENV HYPEGLASS_DISABLE_UI=true
|
||||
|
||||
# RUN curl -sSf https://rye-up.com/get | RYE_INSTALL_OPTION="--yes" bash
|
||||
# ENV PATH="${PATH}:$HOME/.rye/shims"
|
||||
COPY . .
|
||||
# RUN $HOME/.rye/shims/rye sync
|
||||
# RUN . ./.venv/bin/activate
|
||||
RUN pip3 install .
|
||||
|
||||
|
||||
FROM base as ui
|
||||
WORKDIR /opt/hyperglass/hyperglass/ui
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||
RUN apt-get install -y nodejs
|
||||
RUN npm install -g pnpm
|
||||
RUN pnpm install -P
|
||||
|
||||
FROM ui as hyperglass
|
||||
WORKDIR /opt/hyperglass
|
||||
|
||||
EXPOSE ${HYPERGLASS_PORT}
|
||||
CMD ["python3", "-m", "hyperglass.console", "start"]
|
Reference in New Issue
Block a user