30 lines
915 B
Plaintext
30 lines
915 B
Plaintext
services:
|
|
ansible-worker:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: ansible-worker:latest
|
|
container_name: ansible-worker
|
|
|
|
# Keep working dir inside /app
|
|
working_dir: /opt/containers/ansible-worker/app
|
|
|
|
# 🔑 Use the entrypoint from the bind-mounted ./files
|
|
entrypoint: ["/opt/containers/ansible-worker/files/entrypoint.sh"]
|
|
# command: ["sleep", "infinity"]
|
|
command: ["/opt/containers/ansible-worker/app/bin/rabbit-client.sh"]
|
|
|
|
restart: unless-stopped
|
|
tty: true
|
|
stdin_open: true
|
|
|
|
environment:
|
|
ANSIBLE_CONFIG: /opt/containers/ansible-worker/app/ansible.cfg
|
|
ANSIBLE_SSH_ARGS: "-o PubkeyAuthentication=no"
|
|
|
|
volumes:
|
|
# Persist venv/collections/etc.
|
|
- ./data:/opt/containers/ansible-worker/data:rw
|
|
# Expose your files (entrypoint, nbplay, playbooks, etc.)
|
|
- ./files:/opt/containers/ansible-worker/files:rw
|