Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions scripts/vm/cloud-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ packages:
- curl
- git

swap:
filename: /swapfile
size: 4G
maxsize: 4G

write_files:
- path: /etc/sysctl.d/99-swappiness.conf
permissions: '0644'
content: |
vm.swappiness=10

- path: /etc/workspace/config
permissions: '0600'
content: |
Expand All @@ -19,6 +29,7 @@ write_files:
BASE_DOMAIN=${BASE_DOMAIN}
API_URL=${API_URL}
API_TOKEN=${API_TOKEN}
HETZNER_TOKEN=${HETZNER_TOKEN}

- path: /usr/local/bin/idle-check.sh
permissions: '0755'
Expand Down Expand Up @@ -76,6 +87,10 @@ write_files:
fi

runcmd:
# Check swap status
- swapon --show || true
- sysctl --system

# Enable Docker
- systemctl enable docker
- systemctl start docker
Expand Down
Loading