[Unit] Description=DHCP Whitelist Service After=network.target docker.service Requires=docker.service [Service] Type=simple Restart=always RestartSec=10 WorkingDirectory=/opt/dhcp-whitelist Environment="CONFIG_DIR=/etc/dhcp-whitelist" # Pre-start: Build the image ExecStartPre=/usr/bin/docker-compose build # Start the service ExecStart=/usr/bin/docker-compose up # Stop the service ExecStop=/usr/bin/docker-compose down # Reload config by restarting containers ExecReload=/usr/bin/docker-compose restart StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target