Slimming down
This commit is contained in:
		@@ -256,15 +256,62 @@ The `podman-compose.yml` includes Podman-specific options:
 | 
			
		||||
 | 
			
		||||
## 🐛 Troubleshooting
 | 
			
		||||
 | 
			
		||||
### Build Issues on ARM/Raspberry Pi
 | 
			
		||||
 | 
			
		||||
If you encounter build failures on ARM architectures (like Raspberry Pi), the issue is likely due to packages requiring compilation (pydantic-core, uvloop, httptools, watchfiles). These require gcc, make, and Rust/cargo to compile.
 | 
			
		||||
 | 
			
		||||
**Solutions:**
 | 
			
		||||
 | 
			
		||||
1. **Use the ARM-optimized Dockerfile** (Recommended):
 | 
			
		||||
```bash
 | 
			
		||||
# The deploy-podman.sh script automatically detects ARM and uses Dockerfile.arm
 | 
			
		||||
./deploy-podman.sh build
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
2. **Use pre-built multi-arch images** if available:
 | 
			
		||||
```bash
 | 
			
		||||
# Pull a pre-built image instead of building
 | 
			
		||||
podman pull docker.io/yourusername/turmli-calendar:arm
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
3. **Build with the multi-stage Dockerfile** (slower but works):
 | 
			
		||||
```bash
 | 
			
		||||
# This installs build tools in a separate stage
 | 
			
		||||
podman build -f Dockerfile -t turmli-calendar .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
4. **Use the simplified requirements** for ARM:
 | 
			
		||||
```bash
 | 
			
		||||
# Copy ARM requirements
 | 
			
		||||
cp requirements-arm.txt requirements.txt
 | 
			
		||||
podman build -t turmli-calendar .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Common Issues and Solutions
 | 
			
		||||
 | 
			
		||||
#### 1. Permission Denied on Volume Mount
 | 
			
		||||
#### 1. Build Fails with "no acceptable C compiler found"
 | 
			
		||||
This happens when building on systems without development tools.
 | 
			
		||||
 | 
			
		||||
**Solution for containers:**
 | 
			
		||||
```bash
 | 
			
		||||
# Use the multi-stage Dockerfile which includes build tools
 | 
			
		||||
podman build -f Dockerfile -t turmli-calendar .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
**Solution for host system:**
 | 
			
		||||
```bash
 | 
			
		||||
# Install build tools
 | 
			
		||||
sudo apt-get install build-essential  # Debian/Ubuntu
 | 
			
		||||
sudo dnf install gcc make  # Fedora
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### 2. Permission Denied on Volume Mount
 | 
			
		||||
```bash
 | 
			
		||||
# Add :Z flag for SELinux systems
 | 
			
		||||
-v ./calendar_cache.json:/app/calendar_cache.json:Z
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### 2. Container Can't Bind to Port
 | 
			
		||||
#### 3. Container Can't Bind to Port
 | 
			
		||||
```bash
 | 
			
		||||
# Check if port is already in use
 | 
			
		||||
podman port turmli-calendar
 | 
			
		||||
@@ -274,13 +321,13 @@ ss -tlnp | grep 8000
 | 
			
		||||
PORT=8080 ./deploy-podman.sh start
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### 3. Rootless Podman Can't Bind to Privileged Ports (< 1024)
 | 
			
		||||
#### 4. Rootless Podman Can't Bind to Privileged Ports (< 1024)
 | 
			
		||||
```bash
 | 
			
		||||
# Allow binding to port 80 (example)
 | 
			
		||||
sudo sysctl net.ipv4.ip_unprivileged_port_start=80
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### 4. Container Not Starting After Reboot
 | 
			
		||||
#### 5. Container Not Starting After Reboot
 | 
			
		||||
```bash
 | 
			
		||||
# Enable lingering for rootless containers
 | 
			
		||||
loginctl enable-linger $USER
 | 
			
		||||
@@ -290,7 +337,7 @@ loginctl enable-linger $USER
 | 
			
		||||
systemctl --user enable container-turmli-calendar.service
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### 5. DNS Issues in Container
 | 
			
		||||
#### 6. DNS Issues in Container
 | 
			
		||||
```bash
 | 
			
		||||
# Check Podman's DNS configuration
 | 
			
		||||
podman run --rm alpine cat /etc/resolv.conf
 | 
			
		||||
@@ -299,6 +346,32 @@ podman run --rm alpine cat /etc/resolv.conf
 | 
			
		||||
podman run --dns 8.8.8.8 --dns 8.8.4.4 ...
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### 7. ARM/Raspberry Pi Specific Issues
 | 
			
		||||
 | 
			
		||||
**Memory constraints during build:**
 | 
			
		||||
```bash
 | 
			
		||||
# Increase swap space temporarily
 | 
			
		||||
sudo dd if=/dev/zero of=/swapfile bs=1G count=2
 | 
			
		||||
sudo mkswap /swapfile
 | 
			
		||||
sudo swapon /swapfile
 | 
			
		||||
 | 
			
		||||
# Build with limited parallelism
 | 
			
		||||
CARGO_BUILD_JOBS=1 podman build -t turmli-calendar .
 | 
			
		||||
 | 
			
		||||
# Clean up swap after build
 | 
			
		||||
sudo swapoff /swapfile
 | 
			
		||||
sudo rm /swapfile
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
**Use lighter alternatives:**
 | 
			
		||||
```bash
 | 
			
		||||
# Check architecture
 | 
			
		||||
./deploy-podman.sh info
 | 
			
		||||
 | 
			
		||||
# Build with ARM-optimized Dockerfile
 | 
			
		||||
podman build -f Dockerfile.arm -t turmli-calendar .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Debugging Commands
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user