Add visual smoothing for snake game and systemd deployment
CSS animations for smoother 60fps feel despite 7Hz game ticks: - 130ms transitions on cell background/box-shadow - Head pop-in animation on direction changes - Food pulse animation - Smooth death state fade with grayscale Per-snake colored glow on head cells. Make server port configurable via PORT env var (default 8080). Add deploy/ with systemd service and scripts: - setup.sh: create games user, /opt/c4, install unit - deploy.sh: build and install binary, restart service - package.sh: cross-compile, tarball, base64 split for transfer - reassemble.sh: decode and extract on target server
This commit is contained in:
24
deploy/c4.service
Normal file
24
deploy/c4.service
Normal file
@@ -0,0 +1,24 @@
|
||||
[Unit]
|
||||
Description=C4 Game Lobby
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=games
|
||||
Group=games
|
||||
WorkingDirectory=/opt/c4
|
||||
ExecStart=/opt/c4/c4
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
Environment=PORT=8080
|
||||
|
||||
# Hardening
|
||||
NoNewPrivileges=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/opt/c4
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user