Consider splitting this into multiple containers
It is generally recommended that containers only run one service per container, and to avoid one container being responsible for multiple aspects of functionality.
Currently two services and processes are being run in one container within this repository, namely the salt-master and salt-api services and processes. Both of which are started by saltinit.py.
This could instead be replaced by two seperate containers (and potentially images):
version: '3'
services:
saltmaster:
image: saltstack/salt:2019.2
command: salt-master -l debug
ports:
- "4505:4505"
- "4506:4506"
volumes:
- ipc_sockets:/var/run/salt/master/
restart: unless-stopped
saltapi:
image: saltstack/salt:2019.2
command: salt-api -l debug
volumes:
- ./api.conf:/etc/salt/master.d/api.conf
- ipc_sockets:/var/run/salt/master/
ports:
- "8000:8000"
restart: unless-stopped
volumes:
ipc_sockets: