mirror of
https://github.com/house-of-vanity/khm.git
synced 2025-08-21 14:27:14 +00:00
Split cli and gui bins
This commit is contained in:
33
.dockerignore
Normal file
33
.dockerignore
Normal file
@@ -0,0 +1,33 @@
|
||||
# Git
|
||||
.git/
|
||||
.gitignore
|
||||
|
||||
# Rust build artifacts
|
||||
target/
|
||||
Cargo.lock
|
||||
|
||||
# IDE
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Documentation
|
||||
*.md
|
||||
LICENSE
|
||||
|
||||
# CI/CD
|
||||
.github/
|
||||
.gitlab-ci.yml
|
||||
|
||||
# Testing
|
||||
tests/
|
||||
benches/
|
||||
|
||||
# Development files
|
||||
*.log
|
||||
*.tmp
|
25
Dockerfile
25
Dockerfile
@@ -1,23 +1,20 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM ubuntu:22.04
|
||||
FROM alpine:3.19
|
||||
|
||||
# Install runtime dependencies including GUI libraries
|
||||
RUN apt-get update && apt-get install -y \
|
||||
# Install only essential runtime dependencies
|
||||
RUN apk add --no-cache \
|
||||
ca-certificates \
|
||||
libssl3 \
|
||||
libgtk-3-0 \
|
||||
libglib2.0-0 \
|
||||
libcairo2 \
|
||||
libpango-1.0-0 \
|
||||
libatk1.0-0 \
|
||||
libgdk-pixbuf2.0-0 \
|
||||
libxdo3 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
libgcc \
|
||||
libstdc++
|
||||
|
||||
# Copy the appropriate binary based on the target architecture
|
||||
# Copy the CLI binary (without GUI dependencies)
|
||||
ARG TARGETARCH
|
||||
COPY bin/linux_${TARGETARCH}/khm /usr/local/bin/khm
|
||||
RUN chmod +x /usr/local/bin/khm
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/khm"]
|
||||
# Create non-root user
|
||||
RUN adduser -D -u 1000 khm
|
||||
USER khm
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/khm"]
|
34
docker-compose.yml
Normal file
34
docker-compose.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
khm:
|
||||
image: ultradesu/khm:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# Server mode configuration
|
||||
- KHM_SERVER=true
|
||||
- KHM_IP=0.0.0.0
|
||||
- KHM_PORT=8080
|
||||
- KHM_DB_HOST=postgres
|
||||
- KHM_DB_NAME=khm
|
||||
- KHM_DB_USER=khm
|
||||
- KHM_DB_PASSWORD=changeme
|
||||
- KHM_FLOWS=prod,staging,dev
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
- postgres
|
||||
command: ["--server", "--ip", "0.0.0.0", "--port", "8080", "--db-host", "postgres", "--db-name", "khm", "--db-user", "khm", "--db-password", "changeme", "--flows", "prod,staging,dev"]
|
||||
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- POSTGRES_USER=khm
|
||||
- POSTGRES_PASSWORD=changeme
|
||||
- POSTGRES_DB=khm
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
Reference in New Issue
Block a user