Add .dockerignore and update Dockerfile and compose.yaml for SSH key handling
This commit is contained in:
12
.dockerignore
Normal file
12
.dockerignore
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Do not send secrets or local junk to the Docker daemon
|
||||||
|
.env
|
||||||
|
*.env
|
||||||
|
!.env.example
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
**/.DS_Store
|
||||||
|
**/node_modules
|
||||||
|
**/venv
|
||||||
|
**/__pycache__
|
||||||
|
**/*.pyc
|
||||||
|
**/*.log
|
||||||
@@ -13,6 +13,8 @@ RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh
|
|||||||
ARG SSH_PRIVATE_KEY
|
ARG SSH_PRIVATE_KEY
|
||||||
ARG SSH_PUBLIC_KEY
|
ARG SSH_PUBLIC_KEY
|
||||||
ARG OLLAMA_HOST
|
ARG OLLAMA_HOST
|
||||||
|
ARG OLLAMA_PORT
|
||||||
|
ARG SINCE
|
||||||
RUN echo "$SSH_PRIVATE_KEY" > /root/.ssh/id_rsa && \
|
RUN echo "$SSH_PRIVATE_KEY" > /root/.ssh/id_rsa && \
|
||||||
echo "$SSH_PUBLIC_KEY" > /root/.ssh/id_rsa.pub && \
|
echo "$SSH_PUBLIC_KEY" > /root/.ssh/id_rsa.pub && \
|
||||||
chmod 600 /root/.ssh/id_rsa && \
|
chmod 600 /root/.ssh/id_rsa && \
|
||||||
@@ -30,8 +32,8 @@ COPY scripts/auto-boot-ollama-host.lua .
|
|||||||
|
|
||||||
# Environment defaults (can be overridden by compose/Komodo)
|
# Environment defaults (can be overridden by compose/Komodo)
|
||||||
ENV CONTAINER_NAME=paperless-ai \
|
ENV CONTAINER_NAME=paperless-ai \
|
||||||
OLLAMA_HOST=192.168.222.12 \
|
OLLAMA_HOST=${OLLAMA_HOST} \
|
||||||
OLLAMA_PORT=11434 \
|
OLLAMA_PORT=${OLLAMA_PORT} \
|
||||||
SINCE=0s
|
SINCE=${SINCE:-0s}
|
||||||
|
|
||||||
ENTRYPOINT ["lua5.4", "/app/auto-boot-ollama-host.lua"]
|
ENTRYPOINT ["lua5.4", "/app/auto-boot-ollama-host.lua"]
|
||||||
12
compose.yaml
12
compose.yaml
@@ -1,6 +1,14 @@
|
|||||||
services:
|
services:
|
||||||
auto-boot-ollama-host:
|
auto-boot-ollama-host:
|
||||||
build: .
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
# Build-time only (sourced from your .env)
|
||||||
|
SSH_PUBLIC_KEY: "${SSH_PUBLIC_KEY}"
|
||||||
|
SSH_PRIVATE_KEY: "${SSH_PRIVATE_KEY}"
|
||||||
|
OLLAMA_HOST: "${OLLAMA_HOST:-192.168.222.12}"
|
||||||
|
OLLAMA_PORT: "${OLLAMA_PORT:-11434}"
|
||||||
|
SINCE: "${SINCE:-0s}"
|
||||||
container_name: auto-boot-ollama-host
|
container_name: auto-boot-ollama-host
|
||||||
network_mode: host
|
network_mode: host
|
||||||
environment:
|
environment:
|
||||||
@@ -11,8 +19,6 @@ services:
|
|||||||
WOL_MAC: "${WOL_MAC}"
|
WOL_MAC: "${WOL_MAC}"
|
||||||
WOL_BCAST: "${WOL_BCAST:-192.168.222.255}" # optional
|
WOL_BCAST: "${WOL_BCAST:-192.168.222.255}" # optional
|
||||||
WOL_PORT: "${WOL_PORT:-9}" # optional
|
WOL_PORT: "${WOL_PORT:-9}" # optional
|
||||||
#SSH_PUBLIC_KEY: "${SSH_PUBLIC_KEY}"
|
|
||||||
#SSH_PRIVATE_KEY: "${SSH_PRIVATE_KEY}"
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
|||||||
Reference in New Issue
Block a user