mirror of
https://github.com/retspen/webvirtcloud
synced 2026-10-18 00:50:07 +00:00
feat(docker): modernize Dockerfile, add runit init script, and provide docker-compose setup
- Add python3-libvirt to apt and configure --system-site-packages for zero-compilation build - Introduce 10_webvirtcloud_init.sh to handle container startup, migrations, and SQLite persistence - Exclude host settings.py in .dockerignore for clean builds from settings.py.template - Add docker-compose.yml with persistent data and SSH volume mounts - Document Docker Compose deployment in README.md
This commit is contained in:
parent
56fdd07802
commit
b1a843e846
5 changed files with 117 additions and 15 deletions
28
docker-compose.yml
Normal file
28
docker-compose.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
services:
|
||||
webvirtcloud:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: webvirtcloud:latest
|
||||
container_name: webvirtcloud
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "6080:6080"
|
||||
environment:
|
||||
# Optional: custom Django secret key. If unset, automatically generated at first launch.
|
||||
# - SECRET_KEY=your-custom-secret-key-here
|
||||
# Optional: comma-separated trusted CSRF origins (e.g. http://wvc.example.com,https://wvc.example.com)
|
||||
# - CSRF_TRUSTED_ORIGINS=http://localhost,http://127.0.0.1
|
||||
- TZ=UTC
|
||||
volumes:
|
||||
# Persistent SQLite database and runtime data
|
||||
- webvirtcloud-data:/srv/webvirtcloud/data
|
||||
# Persistent SSH keys for compute node authentication
|
||||
- webvirtcloud-ssh:/var/www/.ssh
|
||||
|
||||
volumes:
|
||||
webvirtcloud-data:
|
||||
driver: local
|
||||
webvirtcloud-ssh:
|
||||
driver: local
|
||||
Loading…
Add table
Add a link
Reference in a new issue