Hi,
I am building a small FTP device for file storage which uses NODE.JS to control and OLED screen and a small FTP server. These all work fine, but I want the FTP server to start-up AFTER the OLED screen and monitor and I am struggling to get this to work.
This my compose file:
version: '2'
volumes:
resin-data:
services:
boxBoot:
build: ./box-boot
privileged: true
restart: no
network_mode: host
labels:
io.balena.features.supervisor-api: '1'
boxFTP:
build: ./box-ftp
depends_on:
- "boxBoot"
command: ["sleep 5"]
privileged: false
restart: always
network_mode: host
expose:
- "21"
volumes:
- 'resin-data:/data'
labels:
io.balena.features.supervisor-api: '1'
The problem is that the SLEEP command can not be found, and I don’t know how to introduce a delay. The boxBoot is not a server, it is simply a service monitor with an OLED screen showing output. I use two separate containers, because I will be adding more dockers with more services. This is just an example of a two docker process.
Has anyone had any luck in delaying the startup of a second service? Help much appreciated.