Docker updates for libvirtd

This commit is contained in:
3wc 2021-07-14 00:35:26 +02:00
parent 4816170c03
commit 71e09807a7
2 changed files with 10 additions and 1 deletions

View File

@ -17,7 +17,7 @@ RUN pipenv install --deploy --verbose
FROM python:3.8-alpine FROM python:3.8-alpine
RUN apk add --no-cache libpq libstdc++ libjpeg RUN apk add --no-cache libpq libstdc++ libjpeg virt-install libvirt-client cloud-utils
COPY . /app/code/ COPY . /app/code/
WORKDIR /app/code WORKDIR /app/code

View File

@ -7,15 +7,24 @@ services:
build: . build: .
volumes: volumes:
- "./:/app/code" - "./:/app/code"
- "../tank:/tank"
- "/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock"
depends_on: depends_on:
- db - db
ports: ports:
- "5000:5000" - "5000:5000"
environment: environment:
- "POSTGRES_CONNECTION_PARAMETERS=host=db port=5432 user=capsul password=capsul dbname=capsul" - "POSTGRES_CONNECTION_PARAMETERS=host=db port=5432 user=capsul password=capsul dbname=capsul"
- SPOKE_MODEL=shell-scripts
#- FLASK_DEBUG=1
- BASE_URL=http://localhost:5000
- ADMIN_PANEL_ALLOW_EMAIL_ADDRESSES=3wc.capsul@doesthisthing.work
- VIRSH_DEFAULT_CONNECT_URI=qemu:///system
# The image uses gunicorn by default, let's override it with Flask's # The image uses gunicorn by default, let's override it with Flask's
# built-in development server # built-in development server
command: ["flask", "run", "-h", "0.0.0.0", "-p", "5000"] command: ["flask", "run", "-h", "0.0.0.0", "-p", "5000"]
devices:
- "/dev/kvm:/dev/kvm"
db: db:
image: "postgres:9.6.5" image: "postgres:9.6.5"
volumes: volumes: