52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
|
|
# Example: LinuxKit Server Configuration
|
||
|
|
# Minimal immutable Linux server with your application
|
||
|
|
|
||
|
|
kernel:
|
||
|
|
image: linuxkit/kernel:6.6
|
||
|
|
cmdline: "console=tty0 console=ttyS0"
|
||
|
|
|
||
|
|
init:
|
||
|
|
- linuxkit/init:latest
|
||
|
|
- linuxkit/runc:latest
|
||
|
|
- linuxkit/containerd:latest
|
||
|
|
- linuxkit/ca-certificates:latest
|
||
|
|
|
||
|
|
onboot:
|
||
|
|
- name: sysctl
|
||
|
|
image: linuxkit/sysctl:latest
|
||
|
|
- name: dhcpcd
|
||
|
|
image: linuxkit/dhcpcd:latest
|
||
|
|
|
||
|
|
services:
|
||
|
|
# SSH for management
|
||
|
|
- name: sshd
|
||
|
|
image: linuxkit/sshd:latest
|
||
|
|
binds:
|
||
|
|
- /etc/ssh/authorized_keys:/root/.ssh/authorized_keys
|
||
|
|
|
||
|
|
# Your application
|
||
|
|
- name: myapp
|
||
|
|
image: ghcr.io/myorg/myapp:latest
|
||
|
|
capabilities:
|
||
|
|
- CAP_NET_BIND_SERVICE
|
||
|
|
binds:
|
||
|
|
- /etc/myapp:/etc/myapp:ro
|
||
|
|
|
||
|
|
files:
|
||
|
|
# SSH authorized keys
|
||
|
|
- path: /etc/ssh/authorized_keys
|
||
|
|
mode: "0600"
|
||
|
|
contents: |
|
||
|
|
ssh-ed25519 AAAA... your-key
|
||
|
|
|
||
|
|
# Application config
|
||
|
|
- path: /etc/myapp/config.yaml
|
||
|
|
mode: "0644"
|
||
|
|
contents: |
|
||
|
|
server:
|
||
|
|
host: 0.0.0.0
|
||
|
|
port: 8080
|
||
|
|
database:
|
||
|
|
host: ${DB_HOST:-localhost}
|
||
|
|
port: ${DB_PORT:-5432}
|