-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-stack.yml
More file actions
83 lines (71 loc) · 2.32 KB
/
Copy pathdocker-stack.yml
File metadata and controls
83 lines (71 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Docker Stack deployment template for QLever Control
# This file is designed for use with Docker Swarm
#
# Deploy the stack:
# docker stack deploy -c docker-stack.yml qlever
#
# Remove the stack:
# docker stack rm qlever
#
# List services:
# docker stack services qlever
version: "3.8"
services:
qlever-control:
# Use the latest image from GitHub Container Registry
image: ghcr.io/gipplab/qlever-control:latest
volumes:
# Mount Docker socket to allow running Docker commands on host
# SECURITY WARNING: Mounting the Docker socket gives this container full control over
# the Docker daemon, equivalent to root access on the host. Only use in trusted environments.
# Note: In swarm mode, this will use the socket from the node where the container runs.
# This also limits horizontal scaling - the service must run with replicas: 1
- /var/run/docker.sock:/var/run/docker.sock
# Mount workspace directory for working with files
- qlever-workspace:/workspace
environment:
# Set to "true" to test Docker connectivity on startup
- TEST_DOCKER=false
# Keep container running with stdin and tty
stdin_open: true
tty: true
# Deployment configuration for Docker Swarm
deploy:
# Run one replica of the service
# Note: Must be 1 due to Docker socket mount - cannot scale horizontally
replicas: 1
# Restart policy
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
# Resource limits and reservations
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
# Placement constraints (optional)
# Uncomment to run on manager nodes only
# placement:
# constraints:
# - node.role == manager
# Update configuration
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
order: stop-first
# Rollback configuration
rollback_config:
parallelism: 1
delay: 10s
failure_action: pause
order: stop-first
# Named volume for persistent workspace data across container restarts
volumes:
qlever-workspace:
driver: local