Files
thrillwiki_django_no_react/scripts/unraid/cloud-init-template.yaml
pacnpal c26414ff74 Add comprehensive tests for Parks API and models
- Implemented extensive test cases for the Parks API, covering endpoints for listing, retrieving, creating, updating, and deleting parks.
- Added tests for filtering, searching, and ordering parks in the API.
- Created tests for error handling in the API, including malformed JSON and unsupported methods.
- Developed model tests for Park, ParkArea, Company, and ParkReview models, ensuring validation and constraints are enforced.
- Introduced utility mixins for API and model testing to streamline assertions and enhance test readability.
- Included integration tests to validate complete workflows involving park creation, retrieval, updating, and deletion.
2025-08-17 19:36:20 -04:00

63 lines
1.5 KiB
YAML

#cloud-config
# Ubuntu autoinstall configuration
autoinstall:
version: 1
locale: en_US.UTF-8
keyboard:
layout: us
network:
version: 2
ethernets:
ens3:
dhcp4: true
enp1s0:
dhcp4: true
eth0:
dhcp4: true
ssh:
install-server: true
authorized-keys:
- {SSH_PUBLIC_KEY}
allow-pw: false
storage:
layout:
name: lvm
identity:
hostname: thrillwiki-vm
username: ubuntu
password: "$6$rounds=4096$salt$hash" # disabled - ssh key only
packages:
- openssh-server
- curl
- git
- python3
- python3-pip
- python3-venv
- build-essential
- postgresql
- postgresql-contrib
- nginx
- nodejs
- npm
- wget
- ca-certificates
- openssl
- dnsutils
- net-tools
early-commands:
- systemctl stop ssh
late-commands:
# Enable sudo for ubuntu user
- echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/ubuntu
# Install uv Python package manager
- chroot /target su - ubuntu -c 'curl -LsSf https://astral.sh/uv/install.sh | sh || pip3 install uv'
# Add uv to PATH
- chroot /target su - ubuntu -c 'echo "export PATH=\$HOME/.cargo/bin:\$PATH" >> /home/ubuntu/.bashrc'
# Clone ThrillWiki repository
- chroot /target su - ubuntu -c 'cd /home/ubuntu && git clone {GITHUB_REPO} thrillwiki'
# Setup systemd service for ThrillWiki
- systemctl enable postgresql
- systemctl enable nginx
shutdown: reboot