add compose files for container management
Replace raw podman run with declarative compose.yml per host type. Master (odin) gets compose.master.yml, workers get compose.worker.yml.
This commit is contained in:
15
compose.master.yml
Normal file
15
compose.master.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
ppf:
|
||||||
|
container_name: ppf
|
||||||
|
image: localhost/ppf:latest
|
||||||
|
build: .
|
||||||
|
network_mode: host
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
PYTHONUNBUFFERED: "1"
|
||||||
|
volumes:
|
||||||
|
- .:/app:ro
|
||||||
|
- ./data:/app/data
|
||||||
|
- ./config.ini:/app/config.ini:ro
|
||||||
|
command: python2 -u ppf.py
|
||||||
18
compose.worker.yml
Normal file
18
compose.worker.yml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
ppf-worker:
|
||||||
|
container_name: ppf-worker
|
||||||
|
image: localhost/ppf-worker:latest
|
||||||
|
build: .
|
||||||
|
network_mode: host
|
||||||
|
restart: unless-stopped
|
||||||
|
logging:
|
||||||
|
driver: k8s-file
|
||||||
|
environment:
|
||||||
|
PYTHONUNBUFFERED: "1"
|
||||||
|
volumes:
|
||||||
|
- ./src:/app:ro
|
||||||
|
- ./data:/app/data
|
||||||
|
- ./config.ini:/app/config.ini:ro
|
||||||
|
- ./servers.txt:/app/servers.txt:ro
|
||||||
|
command: python -u ppf.py --worker-v2 --server http://10.200.1.250:8081
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
|
||||||
ppf:
|
|
||||||
build: .
|
|
||||||
volumes:
|
|
||||||
- .:/app
|
|
||||||
working_dir: /app
|
|
||||||
command: python ppf.py
|
|
||||||
environment:
|
|
||||||
- PYTHONUNBUFFERED=1
|
|
||||||
Reference in New Issue
Block a user