Docker Community Forums

Share and learn in the Docker community.

How to start apache2 with SSL module in docker-compose

(Samim32) #1

I’m trying to deploy Production web application in docker-compose, using Apache2, postgreSql & LDAP. To start apache2 server I’m using " /usr/sbin/apachectl -DFOREGROUND" in docker-compose (as I need to attach DB container in back-end), without SSL module it’s absolutely working fine, even it’s authenticating through our AD to login into portal using LDAP. But adding SSL module in Docker file apache2 service failing to start. Below is entry from Dockerfile, prodpapp.yaml error we are getting.


RUN apachectl configtest
RUN a2ensite default-ssl
RUN a2enmod ssl


command:bash -c “python /django/phai_web/ migrate && python /django/phai_web/ collectstatic --noinput && /usr/sbin/apachectl -DFOREGROUND”

Error I’m getting “Action ‘-DFOREGROUND’ failed.”

Can anyone please suggest what need to be done here to work on docker-compose.