Skip to content

Latest commit

 

History

History
113 lines (75 loc) · 1.72 KB

File metadata and controls

113 lines (75 loc) · 1.72 KB

Service Deployment - Deploying Services

Guide for deploying services in NCC-HomeLab.

Note: Installation is done via init-homelab.sh. This documentation describes Docker configuration and features.

Docker Compose (Standard)

Start Service

cd docker/<category>/<service>
docker-compose up -d

Stop Service

docker-compose down

Service Logs

docker-compose logs -f

Docker Swarm (for HA)

Deploy Stack

cd docker/<category>/<service>
docker stack deploy -c docker-stack.yml <stack-name>

Stack Status

docker stack services <stack-name>
docker stack ps <stack-name>

Remove Stack

docker stack rm <stack-name>

Service Configuration

Environment Variables

Most services use .env files:

# Example: Traefik
cd docker/gateway-management/traefik-crowdsec
cat traefik.env

Update Scripts

Many services have update scripts:

./update-traefik-env.sh

Troubleshooting

Service Won't Start

# Check logs
docker logs <container-name>

# Compose logs
docker-compose logs

Network Issues

# Check network
docker network inspect proxy

# Check container network
docker inspect <container-name> | grep -A 10 Networks

Ports Not Reachable

# Check ports
docker ps | grep <service>

# Check firewall
sudo ufw status

Best Practices

  1. Traefik first - All other services depend on it
  2. Backup before updates - Backup important data
  3. Check logs - Always check logs when problems occur
  4. Check network - Services must be in proxy network

Further Information