I want to run a small apache app inside a heroku dyno. It's alongside a js app, which calls out to the php service for a small number of its requests.
The supervisord config for this service is:
[program:pdf-service]
command=apachectl -D FOREGROUND
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
The Dockerfile that builds the image does:
COPY pdf /var/www/html
COPY pdf/apache2/ports.conf /etc/apache2/ports.conf
COPY pdf/apache2/apache2.conf /etc/apache2/apache2.conf
This all works fine when I run it locally (i.e. build the docker container and then run it).
However, when I deploy to heroku, I get an error:
INFO spawned: 'pdf-service' with pid 9
chown: changing ownership of '/var/lock/apache2.A4FPKqG8rS': Operation not permitted
exited: pdf-service (exit status 1; not expected)
Does anyone know why this might be happening / how I can avoid it?
Alternatively, can I spin up the php service in its own container and then call it from the js without using private spaces? I think this isn't possible as dynos can't communicate with each other.